我已经设置了kentico 11,我想显示与当地时间的时差。我使用了DateTime Webpart,但是时间仍然是我的本地时间。我在WebPart中进行配置。
示例:我住在柬埔寨,我想在“马斯喀特阿布扎比”显示时间。
Date and time format: HH:MM TT, mmmm dd , yyyy
Time zone: Custom
Custom time zone: (UTC+04.00) Abu Dhabi, Muscat
如果能解决任何问题,我将不胜感激。
提前谢谢!
答案 0 :(得分:0)
现在我可以解决我的问题了
{% String.FormatString("{0:hh:mm tt, MMMM d, yyyy}", DateTime.UtcNow.AddHours(4)) #%}