Changeset a0203b in indico
- Timestamp:
- 02/18/10 15:54:34 (3 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, new-webex, prov-dual-interface, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
- Children:
- b7c7c8
- Parents:
- 623600
- git-author:
- Pedro Ferreira <jose.pedro.ferreira@…> (02/18/10 15:52:56)
- git-committer:
- Pedro Ferreira <jose.pedro.ferreira@…> (02/18/10 15:54:34)
- Location:
- indico/MaKaC
- Files:
-
- 7 edited
-
common/Configuration.py (modified) (1 diff)
-
common/timerExec.py (modified) (5 diffs)
-
common/timezoneUtils.py (modified) (3 diffs)
-
conference.py (modified) (9 diffs)
-
registration.py (modified) (2 diffs)
-
user.py (modified) (2 diffs)
-
webinterface/timetable.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/common/Configuration.py
r8c65db ra0203b 542 542 # Dont move outside, we need to call Config.getInstance() from setup.py and if 543 543 # the system has no pytz module then the import will break 544 from pytz import common_timezones as Timezones544 from pytz import all_timezones as Timezones 545 545 return Timezones 546 546 -
indico/MaKaC/common/timerExec.py
rc6cd5e ra0203b 42 42 from MaKaC.i18n import _ 43 43 from pytz import timezone 44 from pytz import common_timezones44 from pytz import all_timezones 45 45 46 46 class toExec: … … 326 326 if not tz: 327 327 tz = self.getTimezone() 328 if tz not in common_timezones:328 if tz not in all_timezones: 329 329 tz = 'UTC' 330 330 return self.getStartDate().astimezone(timezone(tz)) … … 340 340 if not tz: 341 341 tz = self.getTimezone() 342 if tz not in common_timezones:342 if tz not in all_timezones: 343 343 tz = 'UTC' 344 344 return self.getEndDate().astimezone(timezone(tz)) … … 380 380 if not tz: 381 381 tz = self.getTimezone() 382 if tz not in common_timezones:382 if tz not in all_timezones: 383 383 tz = 'UTC' 384 384 if self.getLastDate(): … … 666 666 if not tz: 667 667 tz = self.conf.getTimezone() 668 if tz not in common_timezones:668 if tz not in all_timezones: 669 669 tz = 'UTC' 670 670 if self.timeBefore: -
indico/MaKaC/common/timezoneUtils.py
r626e2c ra0203b 1 from pytz import timezone, common_timezones1 from pytz import timezone, all_timezones 2 2 from datetime import datetime, timedelta 3 3 import MaKaC.common.info as info … … 57 57 if isinstance(tz, basestring): 58 58 tz = timezone(tz) 59 if tz.zone not in common_timezones:59 if tz.zone not in all_timezones: 60 60 tz = timezone('UTC') 61 61 return tz.localize(date).astimezone(timezone('UTC')) … … 69 69 if isinstance(tz, basestring): 70 70 tz = timezone(tz) 71 if tz.zone not in common_timezones:71 if tz.zone not in all_timezones: 72 72 tz = timezone('UTC') 73 73 return date.astimezone(tz) -
indico/MaKaC/conference.py
r046026 ra0203b 41 41 42 42 from pytz import timezone 43 from pytz import common_timezones43 from pytz import all_timezones 44 44 45 45 from persistent import Persistent … … 681 681 def getTimezone(self): 682 682 try: 683 if self._timezone not in common_timezones:683 if self._timezone not in all_timezones: 684 684 self.setTimezone('UTC') 685 685 return self._timezone … … 2912 2912 if not tz: 2913 2913 tz = self.getTimezone() 2914 if tz not in common_timezones:2914 if tz not in all_timezones: 2915 2915 tz = 'UTC' 2916 2916 return self.getStartDate().astimezone(timezone(tz)) … … 3020 3020 if not tz: 3021 3021 tz = self.getTimezone() 3022 if tz not in common_timezones:3022 if tz not in all_timezones: 3023 3023 tz = 'UTC' 3024 3024 return self.getEndDate().astimezone(timezone(tz)) … … 5903 5903 if not tz: 5904 5904 tz = self.getConference().getTimezone() 5905 if tz not in common_timezones:5905 if tz not in all_timezones: 5906 5906 tz = 'UTC' 5907 5907 return self.startDate.astimezone(timezone(tz)) … … 7182 7182 if not tz: 7183 7183 tz = self.getConference().getTimezone() 7184 if tz not in common_timezones:7184 if tz not in all_timezones: 7185 7185 tz = 'UTC' 7186 7186 return self.startDate.astimezone(timezone(tz)) … … 7195 7195 if not tz: 7196 7196 tz = self.getConference().getTimezone() 7197 if tz not in common_timezones:7197 if tz not in all_timezones: 7198 7198 tz = 'UTC' 7199 7199 if self.getEndDate(): … … 8593 8593 if not tz: 8594 8594 tz = self.getConference().getTimezone() 8595 if tz not in common_timezones:8595 if tz not in all_timezones: 8596 8596 tz = 'UTC' 8597 8597 return self.getStartDate().astimezone(timezone(tz)) … … 8605 8605 if not tz: 8606 8606 tz = self.getConference().getTimezone() 8607 if tz not in common_timezones:8607 if tz not in all_timezones: 8608 8608 tz = 'UTC' 8609 8609 if self.getEndDate(): -
indico/MaKaC/registration.py
r046026 ra0203b 23 23 from datetime import datetime,timedelta 24 24 from pytz import timezone 25 from pytz import common_timezones25 from pytz import all_timezones 26 26 from MaKaC.common.timezoneUtils import nowutc 27 27 from persistent import Persistent … … 3333 3333 if not tz: 3334 3334 tz = self.getConference().getTimezone() 3335 if tz not in common_timezones:3335 if tz not in all_timezones: 3336 3336 tz = 'UTC' 3337 3337 return self.getRegistrationDate().astimezone(timezone(tz)) -
indico/MaKaC/user.py
r9033fd ra0203b 47 47 48 48 #import ldap 49 from pytz import common_timezones49 from pytz import all_timezones 50 50 import httplib 51 51 import urllib … … 979 979 tz = info.HelperMaKaCInfo.getMaKaCInfoInstance().getTimezone() 980 980 try: 981 if self.timezone in common_timezones:981 if self.timezone in all_timezones: 982 982 return self.timezone 983 983 else: -
indico/MaKaC/webinterface/timetable.py
r9033fd ra0203b 1 # -*- coding: utf-8 -*-1 # -*- coding: utf-8 -*- 2 2 ## 3 3 ## $Id: timetable.py,v 1.24 2009/05/14 18:05:56 jose Exp $ … … 26 26 import pytz 27 27 from pytz import timezone 28 from pytz import common_timezones28 from pytz import all_timezones 29 29 from MaKaC.errors import MaKaCError 30 30 … … 1022 1022 if not tz: 1023 1023 tz = self.getTimezone() 1024 if tz not in common_timezones:1024 if tz not in all_timezones: 1025 1025 tz = 'UTC' 1026 1026 return self.getStartDate().astimezone(timezone(tz)) … … 1029 1029 if not tz: 1030 1030 tz = self.getTimezone() 1031 if tz not in common_timezones:1031 if tz not in all_timezones: 1032 1032 tz = 'UTC' 1033 1033 return self.getStartDate().astimezone(timezone(tz)) … … 1060 1060 if not tz: 1061 1061 tz = self.getTimezone() 1062 if tz not in common_timezones:1062 if tz not in all_timezones: 1063 1063 tz = 'UTC' 1064 1064 return self.getStartDate().astimezone(timezone(tz)) … … 1067 1067 if not tz: 1068 1068 tz = self.getTimezone() 1069 if tz not in common_timezones:1069 if tz not in all_timezones: 1070 1070 tz = 'UTC' 1071 1071 return self.getStartDate().astimezone(timezone(tz))
Note: See TracChangeset
for help on using the changeset viewer.
