mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:07:35 +00:00
Userland: Use Core::DateTime
This commit is contained in:
parent
8f89cc85d1
commit
e22283e5e6
3 changed files with 6 additions and 24 deletions
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibCore/DateTime.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
@ -37,13 +38,6 @@ int main(int argc, char** argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
auto* tm = localtime(&now);
|
||||
printf("%4u-%02u-%02u %02u:%02u:%02u\n",
|
||||
tm->tm_year + 1900,
|
||||
tm->tm_mon + 1,
|
||||
tm->tm_mday,
|
||||
tm->tm_hour,
|
||||
tm->tm_min,
|
||||
tm->tm_sec);
|
||||
printf("%s\n", Core::DateTime::from_timestamp(now).to_string().characters());
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue