aboutsummaryrefslogtreecommitdiffstats
path: root/src/cert/cvc
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/cert/cvc
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/cert/cvc')
-rw-r--r--src/cert/cvc/asn1_eac_tm.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/cert/cvc/asn1_eac_tm.cpp b/src/cert/cvc/asn1_eac_tm.cpp
index ee2ed2ddf..dc38e3296 100644
--- a/src/cert/cvc/asn1_eac_tm.cpp
+++ b/src/cert/cvc/asn1_eac_tm.cpp
@@ -50,14 +50,13 @@ u32bit dec_two_digit(byte b1, byte b2)
/*
* Create an EAC_Time
*/
-EAC_Time::EAC_Time(u64bit timer, ASN1_Tag t)
- :tag(t)
+EAC_Time::EAC_Time(u64bit timer, ASN1_Tag t) : tag(t)
{
- std::tm time_info = time_t_to_tm(timer);
+ calendar_point cal = calendar_value(timer);
- year = time_info.tm_year + 1900;
- month = time_info.tm_mon + 1;
- day = time_info.tm_mday;
+ year = cal.year;
+ month = cal.month;
+ day = cal.day;
}
/*