summaryrefslogtreecommitdiff
path: root/ext/com_dotnet/com_variant.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/com_dotnet/com_variant.c')
-rw-r--r--ext/com_dotnet/com_variant.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c
index 45bebb6c63..a85bc42b62 100644
--- a/ext/com_dotnet/com_variant.c
+++ b/ext/com_dotnet/com_variant.c
@@ -943,6 +943,7 @@ PHP_FUNCTION(variant_date_to_timestamp)
PHP_FUNCTION(variant_date_from_timestamp)
{
long timestamp;
+ time_t ttstamp;
SYSTEMTIME systime;
struct tm *tmv;
VARIANT res;
@@ -959,7 +960,8 @@ PHP_FUNCTION(variant_date_from_timestamp)
VariantInit(&res);
tzset();
- tmv = localtime(&timestamp);
+ ttstamp = timestamp;
+ tmv = localtime(&ttstamp);
memset(&systime, 0, sizeof(systime));
systime.wDay = tmv->tm_mday;