1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- meson.build.orig 2024-12-13 13:08:09 UTC
+++ meson.build
@@ -194,14 +194,14 @@ result = cc.run('''
int main (int argc, char *argv[]) {
char *modifiers[] = { "%Y", "%C%y", "%4Y", "%2C%y", NULL };
- time_t timestamp = -58979923200; /* 0101-01-01T01:01:01Z */
+ time_t timestamp = 0; /* 1970-01-01T00:00:00Z */
char buf[100];
struct tm tm;
int i;
gmtime_r (×tamp, &tm);
for (i = 0; modifiers[i]; i++) {
strftime (buf, sizeof buf, modifiers[i], &tm);
- if (strcmp (buf, "0101") == 0) {
+ if (strcmp (buf, "1970") == 0) {
printf ("%s", modifiers[i]);
return 0;
}
|