DateTimePicker:禁用时区转换(DateTimePicker: disable time zone conversion)

编程入门 行业动态 更新时间:2024-10-12 12:24:40
DateTimePicker:禁用时区转换(DateTimePicker: disable time zone conversion)

我正在使用Kendo UI DateTimePicker,我遇到了绑定问题。 我从json获取数据然后我根据json值创建新的js日期并绑定它。 实际结果是日期转换为本地时区。 我可以禁用转换为本地时区吗?

I am using Kendo UI DateTimePicker and i faced with binding issue. I am getting data from json then i creating new js date based on the json value and bind it. Actual result is that the date is converted to local timezone. Can i disable conversion to local timezone?

最满意答案

DateTimePicker不执行任何转换。 我希望您的日期没有时区特定程序,当您创建新的js日期时,此值被视为UTC并转换为本地。 要解决此问题,您只需从json绑定日期,而无需创建新的js日期。

The DateTimePicker does not perform any conversion. I expect that your date does not have time zone specificator and when you creating new js date this value considered as UTC and converted to local. To solve this problem you can simply bind date from json without creating new js date.

更多推荐

本文发布于:2023-07-17 13:06:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1144909.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:时区   disable   DateTimePicker   conversion   zone

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!