Esempio 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
Esempio 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
Esempio 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)
Esempio 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)