Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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
170
The myth of dynamic language performance
dbussink
3
480
Rubinius - Tales from the trenches @ Railsclub.ru 2012
dbussink
2
220
Rubinius - Tales from the trenches @ Baruco 2012
dbussink
1
280
Rubinius Eurucamp 2012 Workshop
dbussink
2
120
Rubinius Euruko 2012 Lightning talk
dbussink
2
250
Other Decks in Programming
See All in Programming
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
150
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
260
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
560
TestingOsaka6_Ozono
o3
0
250
GoLab2025 Recap
kuro_kurorrr
0
790
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
140
AtCoder Conference 2025
shindannin
0
860
これならできる!個人開発のすゝめ
tinykitten
PRO
0
140
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
700
愛される翻訳の秘訣
kishikawakatsumi
3
360
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
230
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
5
1.5k
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
Making Projects Easy
brettharned
120
6.5k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.2k
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Why Our Code Smells
bkeepers
PRO
340
58k
Claude Code のすすめ
schroneko
67
210k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
42
Crafting Experiences
bethany
0
25
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