Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType Demo Programs
Commits:
-
e0d5329a
by Alexei Podtelezhnikov at 2021-09-09T15:58:00-04:00
1 changed file:
Changes:
... | ... | @@ -160,6 +160,12 @@ |
160 | 160 |
modified = head->Modified[0] == 1 ? modified + 2212122496U
|
161 | 161 |
: modified - 2082844800U;
|
162 | 162 |
|
163 |
+ /* gmtime cannot deal with negative times on some systems */
|
|
164 |
+ if ( created < 0 )
|
|
165 |
+ created = 0;
|
|
166 |
+ if ( modified < 0 )
|
|
167 |
+ modified = 0;
|
|
168 |
+ |
|
163 | 169 |
strftime( buf, sizeof ( buf ), "%Y-%m-%d", gmtime( &created ) );
|
164 | 170 |
printf( "%s%s\n", Name_Field( "created" ), buf );
|
165 | 171 |
strftime( buf, sizeof ( buf ), "%Y-%m-%d", gmtime( &modified ) );
|