Cleanup: use dcp::LocalTime for certificate validity times.
[libdcp.git] / src / local_time.h
index a5a479cd4f80b69d0b6123923e8492df8fdf8abd..b84e3098d0f0dab99ebec9950f0db279323ccdc4 100644 (file)
@@ -103,6 +103,18 @@ public:
                return _year;
        }
 
+       int hour () const {
+               return _hour;
+       }
+
+       int minute () const {
+               return _minute;
+       }
+
+       int second () const {
+               return _second;
+       }
+
        void set_year (int y) {
                _year = y;
        }
@@ -111,6 +123,9 @@ public:
        void add_months (int a);
        void add_minutes (int a);
 
+       static LocalTime from_asn1_utc_time (std::string time);
+       static LocalTime from_asn1_generalized_time (std::string time);
+
        bool operator== (LocalTime const & other) const;
        bool operator!= (LocalTime const & other) const;
        bool operator< (LocalTime const & other) const;