00001 #ifndef PSTIME_TIMEUTILS_H 00002 #define PSTIME_TIMEUTILS_H 00003 00004 //-------------------------------------------------------------------------- 00005 // File and Version Information: 00006 // $Id: TimeUtils.h 1844 2011-05-07 01:51:13Z salnikov $ 00007 // 00008 // Description: 00009 // Class TimeUtils. 00010 // 00011 //------------------------------------------------------------------------ 00012 00013 //----------------- 00014 // C/C++ Headers -- 00015 //----------------- 00016 #include <time.h> 00017 00018 //---------------------- 00019 // Base Class Headers -- 00020 //---------------------- 00021 00022 //------------------------------- 00023 // Collaborating Class Headers -- 00024 //------------------------------- 00025 00026 //------------------------------------ 00027 // Collaborating Class Declarations -- 00028 //------------------------------------ 00029 00030 // --------------------- 00031 // -- Class Interface -- 00032 // --------------------- 00033 00034 namespace PSTime { 00035 00036 /** 00037 * @brief Namespace containing various utility methods for date/time manipulation. 00038 * 00039 * This software was developed for the LCLS project. If you use all or 00040 * part of it, please give an appropriate acknowledgment. 00041 * 00042 * @version \$Id: TimeUtils.h 1844 2011-05-07 01:51:13Z salnikov $ 00043 * 00044 * @author Andrei Salnikov 00045 */ 00046 00047 namespace TimeUtils { 00048 00049 /** 00050 * @brief Convert broken time to UTC time (in UTC timezone). 00051 * 00052 * Unlike mktime this method does not normalize any members of struct tm. 00053 * The members tm_isdst, tm_wday, and tm_yday are entirely ignored. No 00054 * leap seconds accounted. 00055 */ 00056 time_t timegm(struct tm* timeptr); 00057 00058 } 00059 00060 } // namespace PSTime 00061 00062 #endif // PSTIME_TIMEUTILS_H