aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Winget <tewinget@gmail.com>2014-08-03 09:58:11 -0400
committerThomas Winget <tewinget@gmail.com>2014-08-03 09:58:11 -0400
commit7c0f150a29947b55455a1b85fd3b320ca7b51791 (patch)
treeb217563db4683772d864c9fd83772a82d52953df
parentMerge pull request #77 from fluffypony/master (diff)
parentrestored wallets will have timestamp set to June 8 2014. (diff)
downloadmonero-7c0f150a29947b55455a1b85fd3b320ca7b51791.tar.xz
Merge pull request #81 from tewinget/restore-fix
restored wallets will have timestamp set to June 8 2014.
-rw-r--r--src/cryptonote_core/account.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/cryptonote_core/account.cpp b/src/cryptonote_core/account.cpp
index da677e0ab..d07dad33f 100644
--- a/src/cryptonote_core/account.cpp
+++ b/src/cryptonote_core/account.cpp
@@ -68,7 +68,23 @@ DISABLE_VS_WARNINGS(4244 4345)
keccak((uint8_t *)&first, sizeof(crypto::secret_key), (uint8_t *)&second, sizeof(crypto::secret_key));
generate_keys(m_keys.m_account_address.m_view_public_key, m_keys.m_view_secret_key, second, two_random ? false : true);
- m_creation_timestamp = time(NULL);
+
+ struct tm timestamp;
+ timestamp.tm_year = 2014 - 1900; // year 2014
+ timestamp.tm_mon = 6 - 1; // month june
+ timestamp.tm_mday = 8; // 8th of june
+ timestamp.tm_hour = 0;
+ timestamp.tm_min = 0;
+ timestamp.tm_sec = 0;
+
+ if (recover)
+ {
+ m_creation_timestamp = mktime(&timestamp);
+ }
+ else
+ {
+ m_creation_timestamp = time(NULL);
+ }
return first;
}
//-----------------------------------------------------------------