Commit e27f547668cd22ff09e5dfb0961e03b7e82e0506
1 parent
05bdcc44
Exists in
dev
Settings TIME_ZONE = 'UTC' for better portability
Showing
3 changed files
with
18 additions
and
16 deletions
Show diff stats
pyros.py
... | ... | @@ -695,6 +695,16 @@ class Pyros(AManager): |
695 | 695 | self.printFullTerm(Colors.WARNING, "SUMMARY") |
696 | 696 | |
697 | 697 | # |
698 | + # 2) (if not USE_CELERY) Start Agents | |
699 | + # | |
700 | + if TOTAL and not USE_CELERY : | |
701 | + # Start Environment Monitoring Agent | |
702 | + # Start Majordome Agent | |
703 | + # Start Alert Manager Agent | |
704 | + self.start_agents() | |
705 | + # Needed ? | |
706 | + self.sleep(3) | |
707 | + # | |
698 | 708 | # 2) (if USE_CELERY) Start Celery workers |
699 | 709 | # |
700 | 710 | if USE_CELERY: |
... | ... | @@ -738,17 +748,6 @@ class Pyros(AManager): |
738 | 748 | self.changeDirectory("..") |
739 | 749 | ''' |
740 | 750 | |
741 | - # | |
742 | - # 4) (if not USE_CELERY) Start Agents | |
743 | - # | |
744 | - # TODO: | |
745 | - if TOTAL and not USE_CELERY : | |
746 | - # Start Environment Monitoring Agent | |
747 | - # Start Majordome Agent | |
748 | - # Start Alert Manager Agent | |
749 | - self.start_agents() | |
750 | - self.sleep(3) | |
751 | - | |
752 | 751 | # When simulators are finished: |
753 | 752 | #self.kill_simulation() |
754 | 753 | return 0 | ... | ... |
src/pyros/settings.py
... | ... | @@ -184,11 +184,13 @@ AUTH_PASSWORD_VALIDATORS = [ |
184 | 184 | # https://docs.djangoproject.com/en/1.9/topics/i18n/ |
185 | 185 | |
186 | 186 | |
187 | -#LANGUAGE_CODE = 'en-us' | |
188 | -LANGUAGE_CODE = 'fr-FR' | |
187 | +LANGUAGE_CODE = 'en-us' | |
188 | +#LANGUAGE_CODE = 'fr-FR' | |
189 | 189 | |
190 | -#TIME_ZONE = 'UTC' | |
191 | -TIME_ZONE = 'Europe/Paris' | |
190 | +# UTC = FR - 2h in summer | |
191 | +# UTC = FR - 1h in winter | |
192 | +TIME_ZONE = 'UTC' | |
193 | +#TIME_ZONE = 'Europe/Paris' | |
192 | 194 | |
193 | 195 | # If you set this to False, Django will make some optimizations so as not |
194 | 196 | # to load the internationalization machinery. |
... | ... | @@ -203,7 +205,6 @@ USE_L10N = True |
203 | 205 | # If true => "updated" fields in weatherwatch or sitewatch will be saved as UTC time |
204 | 206 | # If false => "updated" fields in weatherwatch or sitewatch will be saved as UTC+1 time (French time) |
205 | 207 | # (Was) Necessary for "pyros test" (no more necessary now because fixtures dates have been converted to naive format without time zone) : |
206 | -# TODO: fix this | |
207 | 208 | # Necessary for ENV monitoring : |
208 | 209 | USE_TZ = False |
209 | 210 | #USE_TZ = True | ... | ... |
src/routine_manager/RequestSerializer.py
... | ... | @@ -88,6 +88,8 @@ class RequestSerializer(): |
88 | 88 | for sequence, albums in self.sequences: |
89 | 89 | if self.relative: |
90 | 90 | # 86400 = nb seconds in 24 h |
91 | + # time.localtime(time.time()) donne l'heure française | |
92 | + # time.gmttime(time.time()) donne l'heure gmt | |
91 | 93 | sequence.jd1 = (time.time() + float(sequence.jd1)) / 86400 + TIMESTAMP_JD |
92 | 94 | sequence.jd2 = (time.time() + float(sequence.jd2)) / 86400 + TIMESTAMP_JD |
93 | 95 | #print("********* jd1,jd2 ", sequence.jd1, sequence.jd2) | ... | ... |