X-Git-Url: http://git.vrable.net/?p=cumulus.git;a=blobdiff_plain;f=main.cc;h=45a415428c2516b4f51574996ae932a308429027;hp=8af3175b64c3b6007a5497f4c4ac8d81e5d9ff7c;hb=748d04c5c242a1dfcc932220eabd14f778e386c9;hpb=636adeac84baeaab72dde713b6e96807ca93de76 diff --git a/main.cc b/main.cc index 8af3175..45a4154 100644 --- a/main.cc +++ b/main.cc @@ -18,8 +18,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* Main entry point for LBS. Contains logic for traversing the filesystem and - * constructing a backup. */ +/* Main entry point for Cumulus. Contains logic for traversing the filesystem + * and constructing a backup. */ #include #include @@ -812,11 +812,12 @@ int main(int argc, char *argv[]) /* Store the time when the backup started, so it can be included in the * snapshot name. */ time_t now; - struct tm time_buf; + struct tm time_buf_local, time_buf_utc; char desc_buf[256]; time(&now); - localtime_r(&now, &time_buf); - strftime(desc_buf, sizeof(desc_buf), "%Y%m%dT%H%M%S", &time_buf); + localtime_r(&now, &time_buf_local); + gmtime_r(&now, &time_buf_utc); + strftime(desc_buf, sizeof(desc_buf), "%Y%m%dT%H%M%S", &time_buf_utc); /* Open the local database which tracks all objects that are stored * remotely, for efficient incrementals. Provide it with the name of this @@ -919,9 +920,10 @@ int main(int argc, char *argv[]) } FILE *descriptor = fdopen(descriptor_fd, "w"); - fprintf(descriptor, "Format: LBS Snapshot v0.8\n"); + fprintf(descriptor, "Format: Cumulus Snapshot v0.11\n"); fprintf(descriptor, "Producer: Cumulus %s\n", cumulus_version); - strftime(desc_buf, sizeof(desc_buf), "%Y-%m-%d %H:%M:%S %z", &time_buf); + strftime(desc_buf, sizeof(desc_buf), "%Y-%m-%d %H:%M:%S %z", + &time_buf_local); fprintf(descriptor, "Date: %s\n", desc_buf); if (backup_scheme.size() > 0) fprintf(descriptor, "Scheme: %s\n", backup_scheme.c_str());