Skip to content

Commit

Permalink
time: add designation field
Browse files Browse the repository at this point in the history
  • Loading branch information
rockorager committed Sep 6, 2024
1 parent dabc692 commit 4decafc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/zeit.zig
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ pub const Instant = struct {
.microsecond = @intCast(micros),
.nanosecond = @intCast(nanos),
.offset = @intCast(adjusted.timestamp - self.unixTimestamp()),
.designation = adjusted.designation,
};
}

Expand Down Expand Up @@ -438,6 +439,7 @@ pub const Time = struct {
microsecond: u10 = 0, // 0-999
nanosecond: u10 = 0, // 0-999
offset: i32 = 0, // offset from UTC in seconds
designation: []const u8 = "",

/// Creates a UTC Instant for this time
pub fn instant(self: Time) Instant {
Expand Down

0 comments on commit 4decafc

Please sign in to comment.