srawlins/timezone

convertDateTimeToCurrentTimeZone

Tigran-Kosemyan opened this issue · 5 comments

origin date always in for example Europe/Paris time zone
device time zone is other,

tz.initializeTimeZones();
tz.setLocalLocation(tz.getLocation('Europe/Paris'));
DateTime originalDateTime = DateTime.parse('2023-04-25 19:00:00');
final detroit = tz.getLocation('my current time zone');
var detroitTime = tz.TZDateTime.from(originalDateTime, detroit);

not converting in other time zone always return current date

Solution 2023-04-25 19:00:00 adding enpiont to incoming date 000000+0200