$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Time
Search
Dirkjan Bussink
February 10, 2015
Programming
0
110
Time
A talk about how to handle time and timezones. Given at Twente.rb
Dirkjan Bussink
February 10, 2015
Tweet
Share
More Decks by Dirkjan Bussink
See All by Dirkjan Bussink
Managing a widely distributed team
dbussink
1
190
The tricky truth about parallel execution and modern hardware
dbussink
0
350
The future of Ruby is faster
dbussink
3
540
Security for dummies
dbussink
1
160
The myth of dynamic language performance
dbussink
3
470
Rubinius - Tales from the trenches @ Railsclub.ru 2012
dbussink
2
220
Rubinius - Tales from the trenches @ Baruco 2012
dbussink
1
270
Rubinius Eurucamp 2012 Workshop
dbussink
2
120
Rubinius Euruko 2012 Lightning talk
dbussink
2
240
Other Decks in Programming
See All in Programming
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
160
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3k
認証・認可の基本を学ぼう前編
kouyuume
0
270
Graviton と Nitro と私
maroon1st
0
130
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
0
260
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
150
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
130
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
140
AIコーディングエージェント(Gemini)
kondai24
0
270
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
360
Patterns of Patterns
denyspoltorak
0
290
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
150
Featured
See All Featured
WENDY [Excerpt]
tessaabrams
8
35k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
70k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Being A Developer After 40
akosma
91
590k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
88
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
29
Tell your own story through comics
letsgokoyo
0
760
BBQ
matthewcrist
89
9.9k
Rails Girls Zürich Keynote
gr2m
95
14k
Discover your Explorer Soul
emna__ayadi
2
1k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
210
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.3k
Transcript
Time Dirkjan Bussink! @dbussink
Time is hard
None
None
None
None
None
Basics
None
Timezones
http://momentjs.com/
http://momentjs.com/
Storing
UTC
Why?
2014-10-26 02:34
A bit more! complicated
Group! by date
None
Who’s date?
http://pellepim.bitbucket.org/jstz/
None
None
Calculations
None
Perspective
None
UTC loses data
UTC + offset
2014-08-19 16:12:50 +0200
Time as a feature
Calendars
None
None
DST
amsterdam = ActiveSupport::TimeZone["Europe/Amsterdam"] time = amsterdam.parse("2014-08-19 17:15") => Tue, 19
Aug 2014 17:15:00 CEST +02:00
sydney = ActiveSupport::TimeZone[“Australia/Sydney"] ! time => Tue, 19 Aug 2014
17:15:00 CEST +02:00 time.in_time_zone(sydney) => Wed, 20 Aug 2014 01:15:00 EST +10:00
later = time + 6.months => Thu, 19 Feb 2015
17:15:00 CET +01:00 ! later.in_time_zone(sydney) => Fri, 20 Feb 2015 03:15:00 EST +11:00
Our recurring meeting! just moved 2 hours!
UTC + offset! isn’t good enough
Time & time zone Europe/Amsterdam Tue, 19 Aug 2014 17:15:00
CEST +02:00
Time tracking
Check in & check out
125% 22:00 00:00 150% Break 150% 01:00 01:30 06:00
DST
125% 150% Break 150% 01:30 02:00 02:59 02:00 03:00
9 hours from 22:00 until 06:00
Very specific! storage format
Day!! ! ! ! ! ! ! 2014-10-26! Start!! !
! ! ! ! 79200!! ! ! End!! ! ! ! ! ! ! 108000! Duration!! ! 32400
Take away
Start with UTC
Be careful! with timezones
Make conscious! decisions