Template:CistaIsOpen

From NovaRoma
(Difference between revisions)
Jump to: navigation, search
(move close time to 17:00 Nov 24 Rome time)
(documentation)
Line 6: Line 6:
 
Server time seems to be GMT
 
Server time seems to be GMT
  
Time now in Roma: {{ #time: G i A| +1 hours }}
+
Time now in Roma is {{ #time: G i A| +1 hours }}. Seconds since 1/1/70 in Roma: {{ #time: U | +1 hours }}
  
Seconds since 1/1/70 in Roma {{ #time: U | +1 hours }}
+
*Cista opens at Nov 9 7:00 {{ #time: U |Nov 9 7:00 }}
 +
*Cista closes at Nov 24 17:00 {{ #time: U | Nov 24 17:00 }}
  
Cista opens at Nov 9 7:00 {{ #time: U |Nov 9 7:00 }}
+
Function is <nowiki>{{#switch: {{#expr: {{#time: U | +1 hours }} >= open time }} |1={{#switch: {{#expr: {{#time: U | +1 hours }} <= close time }} |1=1|}}|}}</nowiki>
Cista closes at Nov 24 17:00 {{ #time: U | Nov 24 17:00 }}
+
  
 +
Where "open time" and "close time" are calculated using
  
Magic: {{#switch: {{#expr: {{#time: U | +1 hours }} >= 1226210400 }} |1={{#switch: {{#expr: {{#time: U | +1 hours }} <= 1226764800 }} |1=1|}}|}}
+
<nowiki>{{ #time: U | time }}</nowiki>
  
 +
The offset between Rome time and server time is accounted for with
 +
 +
<nowiki>{{ #time: U | +1 hours }}</nowiki>
 +
 +
The offset should be checked before each election because Italy uses DST.
  
  
 
</noinclude>
 
</noinclude>

Revision as of 05:11, 10 November 2008

  • If the cista is not open, use nothing.
  • If the cista is open, use anything. The number "1" is suggested.

Server time seems to be GMT

Time now in Roma is 18 38 PM. Seconds since 1/1/70 in Roma: 1714243131

  • Cista opens at Nov 9 7:00 1731132000
  • Cista closes at Nov 24 17:00 1732464000

Function is {{#switch: {{#expr: {{#time: U | +1 hours }} >= open time }} |1={{#switch: {{#expr: {{#time: U | +1 hours }} <= close time }} |1=1|}}|}}

Where "open time" and "close time" are calculated using

{{ #time: U | time }}

The offset between Rome time and server time is accounted for with

{{ #time: U | +1 hours }}

The offset should be checked before each election because Italy uses DST.


Personal tools