aboutsummaryrefslogtreecommitdiffstats
path: root/src/asn1
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-12-24 22:16:48 +0000
committerlloyd <[email protected]>2009-12-24 22:16:48 +0000
commitab35e8266cb93df950c0f93a74f9714d9de40f1c (patch)
tree66ec188b36fcb5557b56635df11cc7a59457276b /src/asn1
parent6e4e7b38b837c5a5141b9dbc3aa4e5450f57865a (diff)
Replace time_t_to_tm with calendar_value which returns a struct representing
the calendar time without tying to a particular format. From the C++0x branch.
Diffstat (limited to 'src/asn1')
-rw-r--r--src/asn1/asn1_tm.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/asn1/asn1_tm.cpp b/src/asn1/asn1_tm.cpp
index c57d1bc73..01d31cfbd 100644
--- a/src/asn1/asn1_tm.cpp
+++ b/src/asn1/asn1_tm.cpp
@@ -27,14 +27,14 @@ X509_Time::X509_Time(const std::string& time_str)
*/
X509_Time::X509_Time(u64bit timer)
{
- std::tm time_info = time_t_to_tm(timer);
-
- year = time_info.tm_year + 1900;
- month = time_info.tm_mon + 1;
- day = time_info.tm_mday;
- hour = time_info.tm_hour;
- minute = time_info.tm_min;
- second = time_info.tm_sec;
+ calendar_point cal = calendar_value(timer);
+
+ year = cal.year;
+ month = cal.month;
+ day = cal.day;
+ hour = cal.hour;
+ minute = cal.minutes;
+ second = cal.seconds;
if(year >= 2050)
tag = GENERALIZED_TIME;