Skip to content

Commit efc2f6e

Browse files
committed
Formatting
1 parent 131c47f commit efc2f6e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

posts/2026-01-14-stop-using-datetime-in-2026-unless-you-work-for-unesco.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ DateTime.now + 1 # => 1 day later
104104

105105
This has caused bugs. Many bugs.
106106

107-
**Ignores DST**. `DateTime` doesn't track daylight saving time. If you use DateTime for anything involving timezones, you will have bugs.
107+
**Ignores DST**. `DateTime` doesn't track daylight saving time. If you use `DateTime` for anything involving timezones, you will have bugs.
108108

109109
**Performance**. `Time` is faster. Noticeably.
110110

@@ -133,7 +133,9 @@ legacy_gem.fetch_date.to_time.in_time_zone
133133
## What to use instead
134134

135135
For timestamps: `Time.current` or `Time.zone.now`
136+
136137
For dates: `Date.current`
138+
137139
For parsing: `Time.zone.parse('2026-01-14 13:00:00')`
138140

139141
## The only exception

0 commit comments

Comments
 (0)