commit cc03664bf18647d0217864bf21e556625814fe88
parent c322cdd470f92b503fea066ce3f837af455c73d8
Author: qorg11 <qorg@vxempire.xyz>
Date: Sun, 15 Nov 2020 17:52:02 +0100
Cleanup code
Diffstat:
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/date.c b/src/date.c
@@ -3,6 +3,7 @@
#include <unistd.h>
#include <time.h>
#include <string.h>
+
int
main(int argc,char *argv[])
{
@@ -25,14 +26,12 @@ main(int argc,char *argv[])
timeinfo = localtime(&now);
if(u)
- {
- timeinfo = gmtime(&now);
- }
-
+ timeinfo = gmtime(&now);
+
if(argc > optind && argv[optind][0] == '+')
{
- argv[optind] = strtok(argv[optind],"+");
- strcpy(FORMAT,argv[optind]);
+ argv[optind] = strtok(argv[optind],"+");
+ strcpy(FORMAT,argv[optind]);
}
strftime(buffer,256,FORMAT,timeinfo);