glyph,
@glyph@mastodon.social avatar

Is it possible to get a zoneinfo.ZoneInfo key (i.e.: IANA tzdb identifier) for the current system timezone, in Python? datetime.now(timezone.utc).astimezone(). gives a potentially ambiguous 'tzname' and 'utcoffset' which make it difficult to communicate long-term time intervals to other systems

#python #datetime #timezones

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • cubers
  • rosin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • slotface
  • khanakhh
  • kavyap
  • InstantRegret
  • Durango
  • JUstTest
  • everett
  • tacticalgear
  • modclub
  • anitta
  • cisconetworking
  • tester
  • ngwrru68w68
  • GTA5RPClips
  • normalnudes
  • megavids
  • Leos
  • provamag3
  • lostlight
  • All magazines