ChipMaster's trial hacks on C++CMS starting with v1.2.1. Not sure I'll follow on with the v2 since it looks to be breaking and mostly frivolous.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
1.3 KiB

  1. //
  2. // Copyright (C) 2009-2012 Artyom Beilis (Tonkikh)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See
  5. // accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. #ifndef BOOSTER_CTIME_H
  9. #define BOOSTER_CTIME_H
  10. #include <booster/config.h>
  11. #include <ctime>
  12. #include <time.h>
  13. namespace booster {
  14. ///
  15. /// Convert POSIX time to local time. Effectivly works as C localtime
  16. ///
  17. BOOSTER_API std::tm local_time(time_t pt);
  18. ///
  19. /// Convert POSIX time to GMT time. Effectivly works as C gmtime
  20. ///
  21. BOOSTER_API std::tm universal_time(time_t pt);
  22. ///
  23. /// Converts local time std::tm \a t to POSIX time normalizing it, effectivly same as mktime
  24. ///
  25. BOOSTER_API time_t normalize_local_time(std::tm &t);
  26. ///
  27. /// Converts GMT time std::tm \a t to POSIX time normalizing it, effectivly same as timegm or mktime in case
  28. /// of GMT time zone.
  29. ///
  30. BOOSTER_API time_t normalize_universal_time(std::tm &t);
  31. ///
  32. /// Converts local time std::tm \a t to POSIX time, effectivly same as mktime but does not modify
  33. /// its parameter
  34. ///
  35. BOOSTER_API time_t make_local_time(std::tm const &t);
  36. ///
  37. /// Converts GMT time std::tm \a t to POSIX time , effectivly same as timegm or mktime in case
  38. /// of GMT time zone, but does not modify its parameter
  39. ///
  40. BOOSTER_API time_t make_universal_time(std::tm const &t);
  41. }
  42. #endif