5 ms·
> All this stuff would be a lot easier if timezones always had to be stated explicitly. On Java, you can use the forbidden-apis build plugin (https://github.co
by cesarb 4y ago
> All this stuff would be a lot easier if timezones always had to be stated explicitly.
On Java, you can use the forbidden-apis build plugin (https://github.com/policeman-tools/forbidden-apis https://github.com/policeman-tools/forbidden-apis) to fail the build whenever a timezone or locale or charset is not specified explicitly (it forbids the methods from the Java API which use an implicit timezone/locale/charset). I don't know whether there's something similar for Python; it might be harder because Python is much more dynamic (though it might be possible to use monkeypatching to warn whenever the bad methods are used).
- iainmerrick 4y agoYeah, I think this is something where static typechecking helps a lot.