srawlins / timezone

Time zone database and time zone aware DateTime object for Dart.
BSD 2-Clause "Simplified" License
102 stars 54 forks source link

TimeZone value is different #49

Closed hemanthStack closed 1 year ago

hemanthStack commented 4 years ago

Hi, I have to set my entire app to one timezone(the api response one) Ex. US/Eastern when I'm doing conversion it not working as desired output

Input final time = TZDateTime.from(TZDateTime.parse(getLocation("US/Eastern"), <utc-time-string>), getLocation(timeZone)); print("${utc-time} -> $time");

Output 2019-11-28T16:45:33 -> 2019-11-28 06:15:00.000-0000

Desired output 2019-11-28T16:45:33 -> 2019-11-28 11:45:00.000-0000

srawlins commented 4 years ago

Sorry for the late response.

What do you mean, "set my entire app to one timezone"? What do you mean by "the api response one"?

Can you give me an example? Since the input is not valid Dart, I can't tell why the output would be different from the desired output.