data.datetime


struct time_t §

All fields are 0-based Year = 1995 means the year of Windows 95 Day = 0 means the first day of the month

Fields

  • uint6 seconds §
    
  • uint6 minutes §
    
  • uint5 hours §
    
  • uint5 day §
    
  • uint4 month §
    
  • uint12 year §
    
struct time_day_t §

time_t with day as smallest element

Fields

  • uint5 day §
    
  • uint4 month §
    
  • uint12 year §
    
using epoch_seconds_t = uint36 §

Enough bits to represent the number of seconds since Jan 1 1970 for all years covered by epoch related functions

using epoch_days_t = uint19 §

Enough bits to represent the number of days since Jan 1 1970 for all years covered by epoch related functions

inline optional<epoch_days_t> utc_days_to_epoch(time_day_t time) §

Converts a time_day_t to days since Jan 1 1970. The input year must be > 1970 and must be less than 2994 Input time is assumed to be UTC (GMT time zone)

inline optional<epoch_seconds_t> utc_time_to_epoch(time_t time) §

Converts a time_t to seconds since Jan 1 1970 The input year must be > 1970 and must be less than 2994 Input time is assumed to be UTC (GMT time zone)