You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the funcs fromTimeZone and inUTCDate complicate conversions. Converting should be as easy as:
let date1 = NSDate()
// I want to know the time here locally and in China
let china = Region(timeZone: chinaTimeZone)
let date2 = date1.inRegion(china)
// Now let us see what we have
print(date1.hour) // prints the local hour
print(date2.hour) // prints the hour in china in our calendar and locale
Mind that this is pseudo code to illustrate the issue.
The text was updated successfully, but these errors were encountered:
Currently the funcs
fromTimeZone
andinUTCDate
complicate conversions. Converting should be as easy as:Mind that this is pseudo code to illustrate the issue.
The text was updated successfully, but these errors were encountered: