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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
200
The tricky truth about parallel execution and modern hardware
dbussink
0
360
The future of Ruby is faster
dbussink
3
550
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
130
Rubinius Euruko 2012 Lightning talk
dbussink
2
250
Other Decks in Programming
See All in Programming
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
140
Oxlint JS plugins
kazupon
1
690
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
20
6.8k
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
510
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
150
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
SourceGeneratorのススメ
htkym
0
190
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
190
組織で育むオブザーバビリティ
ryota_hnk
0
170
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Designing for humans not robots
tammielis
254
26k
Rails Girls Zürich Keynote
gr2m
96
14k
GitHub's CSS Performance
jonrohan
1032
470k
Speed Design
sergeychernyshev
33
1.5k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
320
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
910
Claude Code のすすめ
schroneko
67
210k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
170
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
440
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