Back to index

nordugrid-arc-nox  1.1.0~rc6
Namespaces | Functions
DateTime.cpp File Reference
#include <cstdio>
#include <iomanip>
#include <sstream>
#include "DateTime.h"
#include "StringConv.h"
#include "Logger.h"
#include "Utils.h"

Go to the source code of this file.

Namespaces

namespace  Arc
 ARCJSDLParser The ARCJSDLParser class, derived from the JobDescriptionParser class, is primarily a job description parser for the consolidated job description language (ARCJSDL), derived from JSDL, described in the following document http://svn.nordugrid.org/trac/nordugrid/browser/arc1/trunk/doc/tech_doc/client/job_description.odt.

Functions

time_t timegm (struct tm *tm)
struct tm * localtime_r (const time_t *timep, struct tm *result)
struct tm * gmtime_r (const time_t *timep, struct tm *result)
static Logger Arc::dateTimeLogger (Logger::getRootLogger(),"DateTime")
std::ostream & Arc::operator<< (std::ostream &, const Time &)
 Prints a Time-object to the given ostream -- typically cout.
std::string Arc::TimeStamp (const TimeFormat &=Time::GetFormat())
 Returns a time-stamp of the current time in some format.
std::string Arc::TimeStamp (Time, const TimeFormat &=Time::GetFormat())
 Returns a time-stamp of some specified time in some format.
std::ostream & Arc::operator<< (std::ostream &, const Period &)
 Prints a Period-object to the given ostream -- typically cout.

Function Documentation

struct tm* gmtime_r ( const time_t *  timep,
struct tm *  result 
) [read]

Definition at line 45 of file DateTime.cpp.

                                                            {
  struct tm *TM = gmtime(timep);
  *result = *TM;
  return result;
}

Here is the caller graph for this function:

struct tm* localtime_r ( const time_t *  timep,
struct tm *  result 
) [read]

Definition at line 36 of file DateTime.cpp.

                                                               {
  struct tm *TM = localtime(timep);
  *result = *TM;
  return result;
}

Here is the caller graph for this function:

time_t timegm ( struct tm *  tm)

Definition at line 18 of file DateTime.cpp.

                             {
  bool found;
  std::string tz = Arc::GetEnv("TZ", found);
  Arc::SetEnv("TZ", "UTC");
  tzset();
  tm->tm_isdst = -1;
  time_t ret = mktime(tm);
  if (found)
    Arc::SetEnv("TZ", tz);
  else
    Arc::UnsetEnv("TZ");
  tzset();
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function: