mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-26 22:30:28 +00:00 
			
		
		
		
	- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
		
			
				
	
	
		
			22 lines
		
	
	
		
			555 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			555 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*! \file 
 | |
|   \brief Testing localtime functionality */
 | |
| 
 | |
| #include "localtime.c"
 | |
| #include <sys/time.h>
 | |
| #include <stdio.h>
 | |
| 
 | |
| int main(int argc, char **argv) {
 | |
| 	struct timeval tv;
 | |
| 	struct tm	tm;
 | |
| 	char	*zone[4] = { "America/New_York", "America/Chicago", "America/Denver", "America/Los_Angeles" };
 | |
| 	int	i;
 | |
| 
 | |
| 	gettimeofday(&tv,NULL);
 | |
| 
 | |
| 	for (i=0;i<4;i++) {
 | |
| 		ast_localtime(&tv.tv_sec,&tm,zone[i]);
 | |
| 		printf("Localtime at %s is %04d/%02d/%02d %02d:%02d:%02d\n",zone[i],tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
 | |
| 	}
 | |
| 	return 0;
 | |
| }
 |