houseabsolute / DateTime-TimeZone

Time zone object base class and factory
https://metacpan.org/release/DateTime-TimeZone/
Other
9 stars 25 forks source link

Recommended way to load all timezone files? #20

Closed oschwald closed 7 years ago

oschwald commented 7 years ago

Our app receives timezones as part of user input and potentially could use any of the timezone modules. The docs recommend preloading the modules when using a pre-forking system. Is there a convenient way to preload all of the timezone modules?

autarch commented 7 years ago

Something like this should work ...

DateTime::TimeZone->new( name => $_ ) for DateTime::TimeZone->all_names

That will use a fair bit of memory though.

oschwald commented 7 years ago

Thanks!