You've already forked pg_probackup
							
							
				mirror of
				https://github.com/postgrespro/pg_probackup.git
				synced 2025-10-31 00:17:52 +02:00 
			
		
		
		
	Yet another fixes for DST.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@35 182aca00-e38e-11de-a668-6fd11605f5ce
This commit is contained in:
		
							
								
								
									
										2
									
								
								dir.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								dir.c
									
									
									
									
									
								
							| @@ -459,6 +459,7 @@ dir_read_file_list(const char *root, const char *file_txt) | ||||
| 		struct tm		tm; | ||||
| 		pgFile		   *file; | ||||
|  | ||||
| 		memset(&tm, 0, sizeof(tm)); | ||||
| 		if (sscanf(buf, "%s %c %lu %u %o %d-%d-%d %d:%d:%d", | ||||
| 			path, &type, &write_size, &crc, &mode, | ||||
| 			&tm.tm_year, &tm.tm_mon, &tm.tm_mday, | ||||
| @@ -472,6 +473,7 @@ dir_read_file_list(const char *root, const char *file_txt) | ||||
| 			elog(ERROR_CORRUPTED, _("invalid type '%c' found in \"%s\""), | ||||
| 				type, file_txt); | ||||
| 		} | ||||
| 		tm.tm_isdst = -1; | ||||
|  | ||||
| 		file = (pgFile *) pgut_malloc(offsetof(pgFile, path) + | ||||
| 					(root ? strlen(root) + 1 : 0) + strlen(path) + 1); | ||||
|   | ||||
| @@ -248,6 +248,7 @@ parse_range(pgBackupRange *range, const char *arg1, const char *arg2) | ||||
| 	if (arg2 != NULL) | ||||
| 		remove_not_digit(tmp + strlen(tmp), len - strlen(tmp), arg2); | ||||
|  | ||||
| 	memset(&tm, 0, sizeof(tm)); | ||||
| 	tm.tm_year = 0;		/* tm_year is year - 1900 */ | ||||
| 	tm.tm_mon = 0;		/* tm_mon is 0 - 11 */ | ||||
| 	tm.tm_mday = 1;		/* tm_mday is 1 - 31 */ | ||||
| @@ -267,6 +268,7 @@ parse_range(pgBackupRange *range, const char *arg1, const char *arg2) | ||||
| 	tm.tm_year -= 1900; | ||||
| 	if (num > 1) | ||||
| 		tm.tm_mon -= 1; | ||||
| 	tm.tm_isdst = -1; | ||||
| 	range->begin = mktime(&tm); | ||||
|  | ||||
| 	switch (num) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user