dbm.dumb.open()

dbm.dumb.open(filename[, flag[, mode]]) Open a dumbdbm database and return a dumbdbm object. The filename argument is the basename of the database file (without any specific extensions). When a dumbdbm database is created, files with .dat and .dir extensions are created. The optional flag argument supports only the semantics of 'c' and 'n' values. Other values will default to database being always opened for update, and will be created if it does not exist. The optional mode argument is the

dbm.dumb.error

exception dbm.dumb.error Raised on dbm.dumb-specific errors, such as I/O errors. KeyError is raised for general mapping errors like specifying an incorrect key.

dbm.dumb.dumbdbm.sync()

dumbdbm.sync() Synchronize the on-disk directory and data files. This method is called by the Shelve.sync() method.

dbm.dumb.dumbdbm.close()

dumbdbm.close() Close the dumbdbm database.

datetime.tzinfo.utcoffset()

tzinfo.utcoffset(dt) Return offset of local time from UTC, in minutes east of UTC. If local time is west of UTC, this should be negative. Note that this is intended to be the total offset from UTC; for example, if a tzinfo object represents both time zone and DST adjustments, utcoffset() should return their sum. If the UTC offset isn’t known, return None. Else the value returned must be a timedelta object specifying a whole number of minutes in the range -1439 to 1439 inclusive (1440 = 24*60

datetime.tzinfo.tzname()

tzinfo.tzname(dt) Return the time zone name corresponding to the datetime object dt, as a string. Nothing about string names is defined by the datetime module, and there’s no requirement that it mean anything in particular. For example, “GMT”, “UTC”, “-500”, “-5:00”, “EDT”, “US/Eastern”, “America/New York” are all valid replies. Return None if a string name isn’t known. Note that this is a method rather than a fixed string primarily because some tzinfo subclasses will wish to return differen

datetime.tzinfo.fromutc()

tzinfo.fromutc(dt) This is called from the default datetime.astimezone() implementation. When called from that, dt.tzinfo is self, and dt‘s date and time data are to be viewed as expressing a UTC time. The purpose of fromutc() is to adjust the date and time data, returning an equivalent datetime in self‘s local time. Most tzinfo subclasses should be able to inherit the default fromutc() implementation without problems. It’s strong enough to handle fixed-offset time zones, and time zones acco

datetime.tzinfo.dst()

tzinfo.dst(dt) Return the daylight saving time (DST) adjustment, in minutes east of UTC, or None if DST information isn’t known. Return timedelta(0) if DST is not in effect. If DST is in effect, return the offset as a timedelta object (see utcoffset() for details). Note that DST offset, if applicable, has already been added to the UTC offset returned by utcoffset(), so there’s no need to consult dst() unless you’re interested in obtaining DST info separately. For example, datetime.timetuple(

datetime.tzinfo

class datetime.tzinfo This is an abstract base class, meaning that this class should not be instantiated directly. You need to derive a concrete subclass, and (at least) supply implementations of the standard tzinfo methods needed by the datetime methods you use. The datetime module supplies a simple concrete subclass of tzinfo, timezone, which can represent timezones with fixed offset from UTC such as UTC itself or North American EST and EDT. An instance of (a concrete subclass of) tzinfo c

datetime.timezone.utcoffset()

timezone.utcoffset(dt) Return the fixed value specified when the timezone instance is constructed. The dt argument is ignored. The return value is a timedelta instance equal to the difference between the local time and UTC.