1 |
// Time Zones |
2 |
// |
3 |
// Douglas Thrift |
4 |
// |
5 |
// $Id$ |
6 |
|
7 |
#ifndef _TimeZones_hpp_ |
8 |
#define _TimeZones_hpp_ |
9 |
|
10 |
#include <iostream> |
11 |
#include <fstream> |
12 |
#include <string> |
13 |
#include <list> |
14 |
#include <cstdlib> |
15 |
#include <cstdio> |
16 |
#include <ctime> |
17 |
|
18 |
using namespace std; |
19 |
|
20 |
inline int sputenv(const string& name) |
21 |
{ |
22 |
char* value = new char[name.size() + 1]; |
23 |
|
24 |
sprintf(value, name.c_str()); |
25 |
|
26 |
int code = putenv(value); |
27 |
|
28 |
delete [] value; |
29 |
|
30 |
return code; |
31 |
} |
32 |
|
33 |
class TimeZones |
34 |
{ |
35 |
private: |
36 |
time_t now; |
37 |
void display(); |
38 |
void display(const string& location, const string& zone); |
39 |
public: |
40 |
TimeZones(); |
41 |
~TimeZones() {} |
42 |
}; |
43 |
|
44 |
#endif // _TimeZones_hpp_ |