@@ -0,0 +1,1352 @@
+# encoding: utf-8%0A%22%22%22%0ATimezone utilities%0A%0AJust UTC-awareness right now%0A%22%22%22%0A%0A#-----------------------------------------------------------------------------%0A#  Copyright (C) 2013 The IPython Development Team%0A#%0A#  Distributed under the terms of the BSD License.  The full license is in%0A#  the file COPYING, distributed as part of this software.%0A#-----------------------------------------------------------------------------%0A%0A#-----------------------------------------------------------------------------%0A# Imports%0A#-----------------------------------------------------------------------------%0A%0Afrom datetime import tzinfo, timedelta, datetime%0A%0A#-----------------------------------------------------------------------------%0A# Code%0A#-----------------------------------------------------------------------------%0A# constant for zero offset%0AZERO = timedelta(0)%0A%0Aclass tzUTC(tzinfo):%0A    %22%22%22tzinfo object for UTC (zero offset)%22%22%22%0A%0A    def utcoffset(self, d):%0A        return ZERO%0A%0A    def dst(self, d):%0A        return ZERO%0A%0AUTC = tzUTC()%0A%0Adef utc_aware(unaware):%0A    %22%22%22decorator for adding UTC tzinfo to datetime's utcfoo methods%22%22%22%0A    def utc_method(*args, **kwargs):%0A        dt = unaware(*args, **kwargs)%0A        return dt.replace(tzinfo=UTC)%0A    return utc_method%0A%0Autcfromtimestamp = utc_aware(datetime.utcfromtimestamp)%0Autcnow = utc_aware(datetime.utcnow)%0A

add IPython.utils.tz