summaryrefslogtreecommitdiff
path: root/boost/date_time/c_time.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/date_time/c_time.hpp')
-rw-r--r--boost/date_time/c_time.hpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/boost/date_time/c_time.hpp b/boost/date_time/c_time.hpp
index 5998908c4e..0b07a1b283 100644
--- a/boost/date_time/c_time.hpp
+++ b/boost/date_time/c_time.hpp
@@ -57,15 +57,15 @@ namespace date_time {
static std::tm* localtime(const std::time_t* t, std::tm* result)
{
// localtime_r() not in namespace std???
- #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
- std::tm tmp;
- if(!localtime_r(t,&tmp))
+#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
+ std::tm tmp;
+ if(!localtime_r(t,&tmp))
result = 0;
- else
- *result = tmp;
- #else
+ else
+ *result = tmp;
+#else
result = localtime_r(t, result);
- #endif
+#endif
if (!result)
boost::throw_exception(std::runtime_error("could not convert calendar time to local time"));
return result;
@@ -75,15 +75,15 @@ namespace date_time {
static std::tm* gmtime(const std::time_t* t, std::tm* result)
{
// gmtime_r() not in namespace std???
- #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
- std::tm tmp;
- if(!gmtime_r(t,&tmp))
+#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
+ std::tm tmp;
+ if(!gmtime_r(t,&tmp))
result = 0;
else
- *result = tmp;
- #else
+ *result = tmp;
+#else
result = gmtime_r(t, result);
- #endif
+#endif
if (!result)
boost::throw_exception(std::runtime_error("could not convert calendar time to UTC time"));
return result;