Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working while converting IST to EST #9

Closed
HitendraRathod10 opened this issue Mar 24, 2022 · 1 comment
Closed

Not working while converting IST to EST #9

HitendraRathod10 opened this issue Mar 24, 2022 · 1 comment

Comments

@HitendraRathod10
Copy link

HitendraRathod10 commented Mar 24, 2022

DateTime myDT = DateTime.now();//Current DateTime
print("current time :- ${myDT}");

//current time :- 2022-03-24 17:44:12.158026

DateTime EST = dateTimeToZone(zone: "EST", datetime: myDT);//DateTime in EST zone
print("EST time :- ${EST}");

//EST time :- 2022-03-24 07:14:12.158026Z

this is my code. And right now I check EST zone time on Google it's 8:14 .
Why I m getting difference?

@AKushWarrior
Copy link
Owner

Instant timezones are not daylight-savings aware. Since the east coast is currently using EDT, the provided EST time is one hour behind the daylight savings time.

This is currently expected behavior; i'm working on finding a better system for timezone management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants