Ejemplo n.º 1
0
 def _adjustToTimezone(self, millis, timezone):
     """
     Convert event timestamp to timezone from user property.
     """
     return long(isoToTimestamp(convertTimestampToTimeZone(
                 millis / 1000, timezone, "%Y-%m-%d %H:%M:%S"
                 ))) * 1000
Ejemplo n.º 2
0
 def _adjustToTimezone(self, millis, timezone):
     """
     Convert event timestamp to timezone from user property.
     """
     return long(isoToTimestamp(convertTimestampToTimeZone(
                 millis / 1000, timezone, "%Y-%m-%d %H:%M:%S"
                 ))) * 1000
Ejemplo n.º 3
0
 def convertToUsersTimeZone(self, timestamp):
     """
     This is an instance method so that it is available to
     tal statements, such as reports.
     """
     user = self.zport.dmd.ZenUsers.getUserSettings()
     if user.timezone:
         return convertTimestampToTimeZone(timestamp, user.timezone)
     return isoDateTime(timestamp)
Ejemplo n.º 4
0
 def convertToUsersTimeZone(self, timestamp):
     """
     This is an instance method so that it is available to
     tal statements, such as reports.
     """
     user = self.zport.dmd.ZenUsers.getUserSettings()
     if user.timezone:
         return convertTimestampToTimeZone(timestamp, user.timezone)
     return isoDateTime(timestamp)