FreeBSD Bugzilla – Attachment 252911 Details for
Bug 280922
Change 46c599340f187db577b9212ab18022f3c7380c68 fixes one case (localtime / gmtime -> strftime('%s'), but breaks another
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
example code
strftime_2s.c (text/plain), 554 bytes, created by
Vladislav Shabanov
on 2024-08-19 11:28:51 UTC
(
hide
)
Description:
example code
Filename:
MIME Type:
Creator:
Vladislav Shabanov
Created:
2024-08-19 11:28:51 UTC
Size:
554 bytes
patch
obsolete
>#include <stdio.h> >#include <time.h> >#include <string.h> >#include <stdlib.h> > >int main() { > char buff[100]; > struct tm x; > memset(&x, 0, sizeof(x)); > > x.tm_hour = 9; > x.tm_mday = 16; > x.tm_mon = 10; > x.tm_year = 2019 - 1900; > x.tm_isdst = -1; > > setenv("TZ", "Europe/London", 1); > tzset(); > strftime(buff, sizeof(buff)-1, "%s %F %T %Z", &x); > printf("time1: %s\n", buff); > > setenv("TZ", "Europe/Moscow", 1); > tzset(); > strftime(buff, sizeof(buff)-1, "%s %F %T %Z", &x); > printf("time2: %s\n", buff); >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 280922
: 252911 |
252912