0

I have a problem with momentjs, when I type datetime today, it's work fine, but I type date in august (my country change the time zone) I see the datetime wrong because I'm not in this time zone at this moment.

I Don't understand to fix it.

K.Dᴀᴠɪs
  • 9,945
  • 11
  • 33
  • 43
David
  • 5
  • 5
  • This a problem with dates in programming in general, i'm working on an app now at work where dates are very important i will send you some resources – Joe Warner Mar 14 '18 at 11:26
  • https://stackoverflow.com/questions/2532729/daylight-saving-time-and-time-zone-best-practices http://www.creativedeletion.com/2015/03/19/persisting_future_datetimes.html https://stackoverflow.com/questions/19166995/java-calendar-date-and-time-management-for-a-multi-timezone-application/19170823#19170823 https://www.w3.org/TR/timezone/#pastfuture https://github.com/moment/moment-timezone/issues/440 – Joe Warner Mar 14 '18 at 11:26
  • You should remove the offset if you're not in DST and the time set is then check to see if the date is what you expect without offset if not then it was set in the deadzone and you should notify the user that the time set doesn't exist – Joe Warner Mar 14 '18 at 11:27
  • Thanks @JoeWarner for your help. – David Mar 14 '18 at 11:47
  • No worries the more you research into dates the more your head hurts – Joe Warner Mar 14 '18 at 11:48

0 Answers0