Plan 9 from Bell Labs’s /usr/web/sources/contrib/btdn/src/date-rfc3339.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include<u.h>
#include<libc.h>

/* An implementation of RFC 3339, a profile of ISO 8601; */

void
main(){
	Tm* now = gmtime(time(nil));
	print("%d-%.2d-%.2dT%.2d:%.2d:%.2dZ\n", 
		now-> year+1900, now->mon+1, now->mday, now->hour, now->min, now->sec);
	exits(nil);
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.