mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 09:22:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			378 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			378 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <LibC/time.h>
 | |
| #include <LibC/stdio.h>
 | |
| 
 | |
| int main(int argc, char** argv)
 | |
| {
 | |
|     (void) argc;
 | |
|     (void) argv;
 | |
| 
 | |
|     time_t now = time(nullptr);
 | |
|     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);
 | |
|     return 0;
 | |
| }
 | |
| 
 | 
