Template:EventTime

From BomberGirls
Revision as of 23:49, 11 October 2022 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Test

{{EventTime|2017-03-26 17:00 JST}} - {{EventTime|2017-03-31 20:59 JST}}<br />
{{EventTime|2017-01-31 03:00 JST}} - {{EventTime|2017-03-25 23:59 JST}}<br>

{{#vardefine: utc_timestamp | 1490515200}}{{#vardefine: jst_timestamp | Expression error: Unrecognized punctuation character "{".}}{{#vardefine: utc_display | Error: Invalid time.}}{{#vardefine: jst_display | Error: Invalid time.}}{{#Widget:EventTime|utc={{ #var: utc_timestamp }}|jst={{ #var: jst_timestamp }}|utc_time={{ #var: utc_display }}|jst_time={{ #var: jst_display }}}} - {{#vardefine: utc_timestamp | 1490961540}}{{#vardefine: jst_timestamp | Expression error: Unrecognized punctuation character "{".}}{{#vardefine: utc_display | Error: Invalid time.}}{{#vardefine: jst_display | Error: Invalid time.}}{{#Widget:EventTime|utc={{ #var: utc_timestamp }}|jst={{ #var: jst_timestamp }}|utc_time={{ #var: utc_display }}|jst_time={{ #var: jst_display }}}}
{{#vardefine: utc_timestamp | 1485799200}}{{#vardefine: jst_timestamp | Expression error: Unrecognized punctuation character "{".}}{{#vardefine: utc_display | Error: Invalid time.}}{{#vardefine: jst_display | Error: Invalid time.}}{{#Widget:EventTime|utc={{ #var: utc_timestamp }}|jst={{ #var: jst_timestamp }}|utc_time={{ #var: utc_display }}|jst_time={{ #var: jst_display }}}} - {{#vardefine: utc_timestamp | 1490453940}}{{#vardefine: jst_timestamp | Expression error: Unrecognized punctuation character "{".}}{{#vardefine: utc_display | Error: Invalid time.}}{{#vardefine: jst_display | Error: Invalid time.}}{{#Widget:EventTime|utc={{ #var: utc_timestamp }}|jst={{ #var: jst_timestamp }}|utc_time={{ #var: utc_display }}|jst_time={{ #var: jst_display }}}}

Add a second parameter for non-JST time

UTC, PDT, PST etc as the second parameter must be added for the right time to appear.

{{EventTime|03:00 UTC|UTC}} - {{EventTime|2017-03-25 23:59 UTC|UTC}}

{{#vardefine: utc_timestamp | 1732417200}}{{#vardefine: jst_timestamp | Expression error: Unrecognized punctuation character "{".}}{{#vardefine: utc_display | Error: Invalid time.}}{{#vardefine: jst_display | Error: Invalid time.}}{{#Widget:EventTime|utc={{ #var: utc_timestamp }}|jst={{ #var: jst_timestamp }}|utc_time={{ #var: utc_display }}|jst_time={{ #var: jst_display }}}} - {{#vardefine: utc_timestamp | 1490486340}}{{#vardefine: jst_timestamp | Expression error: Unrecognized punctuation character "{".}}{{#vardefine: utc_display | Error: Invalid time.}}{{#vardefine: jst_display | Error: Invalid time.}}{{#Widget:EventTime|utc={{ #var: utc_timestamp }}|jst={{ #var: jst_timestamp }}|utc_time={{ #var: utc_display }}|jst_time={{ #var: jst_display }}}}

{{EventTime|03:00 PDT|PDT}} - {{EventTime|2017-03-25 23:59 PDT|PDT}}

{{#vardefine: utc_timestamp | 1732442400}}{{#vardefine: jst_timestamp | Expression error: Unrecognized punctuation character "{".}}{{#vardefine: utc_display | Error: Invalid time.}}{{#vardefine: jst_display | Error: Invalid time.}}{{#Widget:EventTime|utc={{ #var: utc_timestamp }}|jst={{ #var: jst_timestamp }}|utc_time={{ #var: utc_display }}|jst_time={{ #var: jst_display }}}} - {{#vardefine: utc_timestamp | 1490511540}}{{#vardefine: jst_timestamp | Expression error: Unrecognized punctuation character "{".}}{{#vardefine: utc_display | Error: Invalid time.}}{{#vardefine: jst_display | Error: Invalid time.}}{{#Widget:EventTime|utc={{ #var: utc_timestamp }}|jst={{ #var: jst_timestamp }}|utc_time={{ #var: utc_display }}|jst_time={{ #var: jst_display }}}}


Do not do this {{#vardefine: utc_timestamp | 1732459500}}{{#vardefine: jst_timestamp | Expression error: Unrecognized punctuation character "{".}}{{#vardefine: utc_display | Error: Invalid time.}}{{#vardefine: jst_display | Error: Invalid time.}}{{#Widget:EventTime|utc={{ #var: utc_timestamp }}|jst={{ #var: jst_timestamp }}|utc_time={{ #var: utc_display }}|jst_time={{ #var: jst_display }}}} This is the same time as above but without the UTC second parameter. It shows the wrong time on the tooltip. (Though local machine time is correct.)

Known bugs:

  • Doing {{EventTime|14:45 JST|}} gives the right times, but no JST timezone on the tooltip. Do it without the second | (so {{EventTime|14:45 JST}} for it to show up correctly. {{#vardefine: utc_timestamp | 1732427100}}{{#vardefine: jst_timestamp | Expression error: Unrecognized punctuation character "{".}}{{#vardefine: utc_display | Error: Invalid time.}}{{#vardefine: jst_display | Error: Invalid time.}}{{#Widget:EventTime|utc={{ #var: utc_timestamp }}|jst={{ #var: jst_timestamp }}|utc_time={{ #var: utc_display }}|jst_time={{ #var: jst_display }}}} VS {{#vardefine: utc_timestamp | 1732427100}}{{#vardefine: jst_timestamp | Expression error: Unrecognized punctuation character "{".}}{{#vardefine: utc_display | Error: Invalid time.}}{{#vardefine: jst_display | Error: Invalid time.}}{{#Widget:EventTime|utc={{ #var: utc_timestamp }}|jst={{ #var: jst_timestamp }}|utc_time={{ #var: utc_display }}|jst_time={{ #var: jst_display }}}}