Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 0 additions & 106 deletions .latch/change.latch.md

This file was deleted.

20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ pub fn main() !void {
defer threaded.deinit();
const io = threaded.io();

// Get an instant in time. The default gets "now" in UTC
const now = try zeit.instant(io, .{});
// Get a "now" instant in UTC.
const now = zeit.instant(.{.now = io}, &zeit.utc);

// Load our local timezone. This needs an allocator. Optionally pass in a
// zeit.EnvConfig to support TZ and TZDIR environment variables
Expand Down Expand Up @@ -73,16 +73,16 @@ pub fn main() !void {
defer vienna.deinit();

// Parse an Instant from an ISO8601 or RFC3339 string
_ = try zeit.instant(io, .{
.source = .{
.iso8601 = "2024-03-16T08:38:29.496-1200",
},
_ = try zeit.instantFromText(
.iso8601,
"2024-03-16T08:38:29.496-1200",
&zeit.utc,
});

_ = try zeit.instant(io, .{
.source = .{
.rfc3339 = "2024-03-16T08:38:29.496706064-1200",
},
_ = try zeit.instantFromText(
.rfc3339,
"2024-03-16T08:38:29.496706064-1200",
&zeit.utc,
});
}
```
2 changes: 1 addition & 1 deletion src/timezone.zig
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ pub const Windows = struct {
/// 4. Determine if we are in DST or not
/// 5. Return result
pub fn adjust(self: Windows, timestamp: Seconds) AdjustedTime {
const instant = zeit.instant(undefined, .{ .source = .{ .unix_timestamp = timestamp } }) catch unreachable;
const instant = zeit.instant(.{ .unix_timestamp = timestamp }, &zeit.utc);
const time = instant.time();

const systemtime: windows.SYSTEMTIME = .{
Expand Down
Loading
Loading