summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-08-16 00:14:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-08-16 09:52:55 +0200
commitda46f3db22814c03fbc303275342f7182ea288b4 (patch)
tree89f52989aa9fef23b89ecc21ae3d459e9e9314e3 /tools
parent59785c0237f2bc5eaf9e9742bdf30136f3b3d2ba (diff)
cid#1509285 Use of 32-bit time_t
Change-Id: I5aea4aaa6da8cd974234ab3f0c36212d436e11df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138332 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/datetime/ttime.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx
index ee9e427205ef..148bf0cbecc6 100644
--- a/tools/source/datetime/ttime.cxx
+++ b/tools/source/datetime/ttime.cxx
@@ -412,17 +412,17 @@ Time tools::Time::GetUTCOffset()
{
nTime = time( nullptr );
localtime_r( &nTime, &aTM );
- sal_Int32 nLocalTime = mktime( &aTM );
+ auto nLocalTime = mktime( &aTM );
#if defined(__sun)
// Solaris gmtime_r() seems not to handle daylight saving time
// flags correctly
- nUTC = nLocalTime + ( aTM.tm_isdst == 0 ? timezone : altzone );
+ auto nUTC = nLocalTime + ( aTM.tm_isdst == 0 ? timezone : altzone );
#elif defined( LINUX )
// Linux mktime() seems not to handle tm_isdst correctly
- sal_Int32 nUTC = nLocalTime - aTM.tm_gmtoff;
+ auto nUTC = nLocalTime - aTM.tm_gmtoff;
#else
gmtime_r( &nTime, &aTM );
- sal_Int32 nUTC = mktime( &aTM );
+ auto nUTC = mktime( &aTM );
#endif
nCacheTicks = nTicks;
nCacheSecOffset = (nLocalTime-nUTC) / 60;