带有数据源的 NSTableView 中的 NSDateFormatter
我正在尝试在表视图中的单元格上使用 NSDateFormatter
。我的表视图使用数据源而不是 NSArrayController。
由于某种原因,当我输入日期时,setObjectValue:forTableColumn...
会获取时区为 -0000
的日期。我在 IB 中设置了格式化程序,并且还尝试在委托方法 dataCellForTableColumn
中进行设置。
为什么 NSDateFormatter
不保留时区?
I am trying to use the NSDateFormatter
on a cell in a table view. My table view uses a dataSource not an NSArrayController
.
For some reason, when I enter a date, the setObjectValue:forTableColumn...
gets a date with ‑0000
timezone. I set the formatter in IB and I also tried setting in the delegate method dataCellForTableColumn
.
Why doesn't the NSDateFormatter
keep the time zone?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论