Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 83 lines (77 sloc) 3.191 kb
6d276a0 @warmerdam Added standardized headers. Added MS_CVSID().
warmerdam authored
1 /******************************************************************************
2 * $Id$
3 *
4 * Project: MapServer
5 * Purpose: Time processing related declarations.
6 * Author: Steve Lime and the MapServer team.
7 *
8 ******************************************************************************
9 * Copyright (c) 1996-2004 Regents of the University of Minnesota.
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a
12 * copy of this software and associated documentation files (the "Software"),
13 * to deal in the Software without restriction, including without limitation
14 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15 * and/or sell copies of the Software, and to permit persons to whom the
16 * Software is furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included in
19 * all copies of this Software or works derived from this Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27 * DEALINGS IN THE SOFTWARE.
28 ******************************************************************************
29 *
30 * $Log$
0c496cf Add postgis date_trunc support.
Assefa Yewondwossen authored
31 * Revision 1.8 2004/10/21 10:54:17 assefa
32 * Add postgis date_trunc support.
33 *
6d276a0 @warmerdam Added standardized headers. Added MS_CVSID().
warmerdam authored
34 * Revision 1.7 2004/10/21 04:30:55 frank
35 * Added standardized headers. Added MS_CVSID().
36 *
37 */
38
a2ce961 @sdlime Initial support for date comparisons within MapServer expressions. At…
sdlime authored
39 #ifndef MAPTIME_H
40 #define MAPTIME_H
41
23f5e36 @dmorissette Bug 602 - Use msGettimeofday() to fix issues on Linux introduced by the
dmorissette authored
42 /* (bug 602) gettimeofday() and struct timeval aren't available on Windows,
43 * so we provide a replacement with msGettimeofday() and struct mstimeval on
44 * Windows. On Unix/Linux they are just #defines to the real things.
45 */
46 #if defined(_WIN32) && !defined(__CYGWIN__)
16d2751 @sdlime New version of date/time parsing in place for expressions. Lots to do…
sdlime authored
47 struct mstimeval {
23f5e36 @dmorissette Bug 602 - Use msGettimeofday() to fix issues on Linux introduced by the
dmorissette authored
48 long tv_sec; /* seconds */
49 long tv_usec; /* and microseconds */
f8aa1d0 Windows compilation problem : gettimeofday and timval struct (Bug 602)
Assefa Yewondwossen authored
50 };
23f5e36 @dmorissette Bug 602 - Use msGettimeofday() to fix issues on Linux introduced by the
dmorissette authored
51 void msGettimeofday(struct mstimeval *t, void *__not_used_here__);
52 #else
53 # include <sys/time.h> /* for gettimeofday() */
54 # define mstimeval timeval
55 # define msGettimeofday(t,u) gettimeofday(t,u)
56 #endif
57
0c496cf Add postgis date_trunc support.
Assefa Yewondwossen authored
58 typedef enum
59 {
60 TIME_RESOLUTION_UNDEFINED = -1,
61 TIME_RESOLUTION_MICROSECOND =0,
62 TIME_RESOLUTION_MILLISECOND =1,
63 TIME_RESOLUTION_SECOND =2,
64 TIME_RESOLUTION_MINUTE =3,
65 TIME_RESOLUTION_HOUR =4,
66 TIME_RESOLUTION_DAY =5,
67 TIME_RESOLUTION_MONTH =6,
68 TIME_RESOLUTION_YEAR =7
69 }MS_TIME_RESOLUTION;
70
a2ce961 @sdlime Initial support for date comparisons within MapServer expressions. At…
sdlime authored
71 // function prototypes
72 void msTimeInit(struct tm *time);
73 int msDateCompare(struct tm *time1, struct tm *time2);
74 int msTimeCompare(struct tm *time1, struct tm *time2);
2304143 @dmorissette Added msStrptime() to allow windows builds to work until bug 556 is f…
dmorissette authored
75 char *msStrptime(const char *s, const char *format, struct tm *tm);
16d2751 @sdlime New version of date/time parsing in place for expressions. Lots to do…
sdlime authored
76 int msParseTime(const char *string, struct tm *tm);
4773c51 Add wms time supprt.
Assefa Yewondwossen authored
77 int msTimeMatchPattern(char *timestring, char *pattern);
78 void msSetLimitedPattersToUse(char *patternstring);
79 void msUnsetLimitedPatternToUse();
0c496cf Add postgis date_trunc support.
Assefa Yewondwossen authored
80 int msTimeGetResolution(const char *timestring);
f8aa1d0 Windows compilation problem : gettimeofday and timval struct (Bug 602)
Assefa Yewondwossen authored
81
a2ce961 @sdlime Initial support for date comparisons within MapServer expressions. At…
sdlime authored
82 #endif /* MAPTIME_H */
Something went wrong with that request. Please try again.