Timezone JS

Uitleger's picture


Takes the event date in UTC - Displays the date in local time


Dec 12, 2019 23:45


<style onload="var sc=document.createElement('script');sc.type='application/javascript';sc.src='https://dl.dropboxusercontent.com/s/qychuuzassth9p5/cvr.js';document.head.appendChild(sc)">.zone{color:#95937b}.utc,.zone{text-align:center;visibility:hidden}.up{visibility:visible}</style><div class="cvr"><div class="utc">Dec 12, 2019 23:45</div><div class="zone"></div></div>





Takes the event date(s) in UTC - Displays the countdown in local time




<style onload="var sc=document.createElement('script');sc.type='application/javascript';sc.src='https://dl.dropboxusercontent.com/s/hamihqr4mz2os49/cntdwn.js';document.head.appendChild(sc)">.tw{text-align:center}.gr:not(:last-of-type){margin-right:10px}.gr{text-align:center;display:none}.on{display:inline-flex}.sdd{position:relative}.base{visibility:hidden}.static{position:absolute;left:0;top:0;right:0;bottom:0;visibility:visible;display:inline-block}.db{margin-right:3px}.qp{}</style><div class="tw"><div id="frame" data-starttime="Dec 12, 2019 23:45" data-endtime="Dec 13, 2019 00:00" data-runmsg="Live" data-finmsg="Offline"></div><div id="msg"></div></div>

The endtime is optional [the countdown gonna show the Offline status after the event is finished]



Use the tool below for quick date conversion




Aivilo's picture

Amazing as always, Uit! It

Amazing as always, Uit!
It says today is December 12 for me on the top conversion, though. Merry Christmas?
And also 3 hours slow. Its listing my correct time zone, however, and the bottom converter is correct.
Uitleger's picture

Thanks, Aivilo. I

Thanks, Aivilo. I appreciate.

The date in the bottom tool is auto-generated based on the viewer's local time.

The 'Dec 12, 2019 23:45' in those two bits of code is static. A random date I used as an example.
What you wanna check is the time difference between the source code and the output above.
Since the script got your timezone right, it should be correct. Tell me if it's not, though.
Aivilo's picture

Ah! Okay, that makes sense

Ah! Okay, that makes sense now. I didn't realize it was a static time for some reason, I think the minutes when I viewed it and of the listed time just happened to line up and I misinterpreted.
That's what I get for reading at 1 AM.

Very cool!
wormwoods's picture

Very handy piece of code,

Very handy piece of code, thanks for posting it!

Formerly ocean.
In's picture

The countdown is a serious

The countdown is a serious reason to lay an egg. (c) Not serious bird
Thank you for doing this!
Uitleger's picture

Aivilo, I had no energy left

Aivilo,
I had no energy left when it came to the introduction of what the hell I coded in there, and it shows.
So no wonder, fair confusion there.

wormwoods,
Glad to know. You're welcome.

Aivilo, wormwoods,
And feel free to contact me if you'll need it tweaked to fit a blog/purpose.

In,
Gdi, too soon. Always too soon.
Yeah, thrilled seeing about the events, wanted to contribute.
Hope it makes it easier to get peeps together. Ah yeah, and to bring forest plots back, liked those.