Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
db42400f
Commit
db42400f
authored
Aug 12, 2004
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
portability
parent
02a31557
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
skeletons/GeneralizedTime.c
skeletons/GeneralizedTime.c
+19
-1
No files found.
skeletons/GeneralizedTime.c
View file @
db42400f
...
...
@@ -32,6 +32,24 @@ static struct tm *gmtime_r(time_t *tloc, struct tm *result) {
return
0
;
}
#define tzset() _tzset()
static
time_t
timegm
(
struct
tm
*
tm
)
{
time_t
tloc
;
char
*
tz
;
tz
=
getenv
(
"TZ"
);
setenv
(
"TZ"
,
""
,
1
);
tzset
();
tloc
=
mktime
(
tm
);
if
(
tz
)
setenv
(
"TZ"
,
tz
,
1
);
else
unsetenv
(
"TZ"
);
tzset
();
return
tloc
;
}
#if 0 /* Alternate version */
/* vlm: I am not sure about validity of this algorithm. */
static time_t timegm(struct tm *tm) {
struct tm tmp;
...
...
@@ -42,7 +60,7 @@ static time_t timegm(struct tm *tm) {
tm->tm_gmtoff = 0; /* Simulate GMT */
return tloc;
}
#endif
#endif
/* WIN32 */
#ifndef __NO_ASN_TABLE__
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment