srawlins / timezone

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

Unhandled Exception: Location with the name "Asia/Calcutta" doesn't exist #79

Closed faisalmushtaq007 closed 2 years ago

faisalmushtaq007 commented 3 years ago

Asia/Calcutta has been tagged as obselete and has to be changed to Asia/Kolkata. Update as soon as possible

DominicOrga commented 3 years ago

I was able to use deprecated locations by importing 'package:timezone/data/latest_all.dart' instead of 'package:timezone/data/latest.dart'.

bluntmess commented 3 years ago

This happens only in emulators due to the wrong region set in the time-zone setting.

To fix it:- Go to emulator Settings > System > Date and time. Here you have to turn off 'Use network-provided time zone'. And after that click the 'Time zone' option and set the region manually inside it. In this case, you should set it to India.

srawlins commented 2 years ago

Sorry for the late reply. Using latest_all database should solve this issue.