Next / Previous / Contents / TCC Help System / NM Tech homepage

9.13. zoneCodeMap: Dictionary of time zones

This dictionary is used in Section 9.9, “parseZone(): Process a time zone suffix” to convert time zone codes to tzinfo instances.

sidereal.py
utcZone  =  FixedZone(0, 0, "UTC")

estZone  =  FixedZone(-5, 0, "EST")
edtZone  =  FixedZone(-4, 0, "EDT")
etZone   =  USTimeZone(-5, 0, "ET", "EST", "EDT")

cstZone  =  FixedZone(-6, 0, "CST")
cdtZone  =  FixedZone(-5, 0, "CDT")
ctZone   =  USTimeZone(-6, 0, "CT", "CST", "CDT")

mstZone  =  FixedZone(-7, 0, "MST")
mdtZone  =  FixedZone(-6, 0, "MDT")
mtZone   =  USTimeZone(-7, 0, "MT", "MST", "MDT")

pstZone  =  FixedZone(-8, 0, "PST")
pdtZone  =  FixedZone(-7, 0, "PDT")
ptZone   =  USTimeZone(-8, 0, "PT", "PST", "PDT")

zoneCodeMap  =  {
    "UTC": utcZone,
    "EST": estZone,    "EDT": edtZone,    "ET":  etZone,
    "CST": cstZone,    "CDT": cdtZone,    "CT":  ctZone,
    "MST": mstZone,    "MDT": mdtZone,    "MT":  mtZone,
    "PST": pstZone,    "PDT": pdtZone,    "PT":  ptZone }