Closed DevboiDesigns closed 1 year ago
DateTime.now
does not take any parameters. From its documentation:
Create a DateTime for the current instant, in the system's time zone.
For your use case you want DateTime.local
, which allows you to set the zone, locale and many other options.
Describe the bug When passing timezone options to the .now() method, the wrong time is shown.
To Reproduce
Actual vs Expected behavior Give me the time it currently is in New York
Desktop (please complete the following information):
Additional context Maybe this should be a feature but it seems like it would already be a feature. Let me know if I am mistaken.
Work Around I just used the fromJSDate() method and it worked correctly