struct axl::sys::Time

#include <axl_sys_Time.h>

struct Time
{
    // fields

    uint16_t m_year;
    uint16_t m_month;
    uint16_t m_monthDay;
    uint16_t m_dayOfWeek;
    uint16_t m_hour;
    uint16_t m_minute;
    uint16_t m_second;
    uint16_t m_milliSecond;
    uint16_t m_microSecond;
    uint16_t m_nanoSecond;

    // construction

    Time();
    Time(uint64_t timestamp);

    Time(
        uint64_t timestamp,
        int timeZone
        );

    // methods

    uint64_t
    getTimestamp() const;

    uint64_t
    getTimestamp(int timeZone) const;

    void
    setTimestamp(uint64_t timestamp);

    void
    setTimestamp(
        uint64_t timestamp,
        int timeZone
        );

    size_t
    format(
        sl::String* string,
        const sl::StringRef& formatString = "%W %D %N %Y %h:%m:%s"
        ) const;

    sl::String
    format(const sl::StringRef& formatString = "%W %D %N %Y %h:%m:%s") const;
};