Question
could someone help me to format thr GMT time in C as the following: implement a simplified version of the UNIX date command. This command
could someone help me to format thr GMT time in C as the following:
implement a simplified version of the UNIX date command. This command gives current system date. For example, if we run date 0, then the current system date is returned in 24 hour format in GMT time zone. If we run date 1, then the current system date is returned in 12 hour format in GMT time zone.
You are responsible to create a new file called date.c, and write a program that will:
Accepts arguments from the command line interface. You are expected to do the necessary error checking with the corresponding error message.
See examples at the end of the handout.
Get the date by calling getDate system call o int getDate(struct rtcdate *myDate)
Print the date or the error message.
Case 1 date
Returns current date in GMT time zone in 24 hr format
Case 2 date 0
Returns current date in GMT time zone in 24 hr form
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started