This topic is locked
[SOLVED]

 Locale Settings

1/13/2014 3:39:52 PM
PHPRunner General questions
Graphix author

Hi

I have a strange problem with Date and Time,

Im trying to set default values on a date field and a time field php.ini is set to London/Europe and php runner is set to UK

put when I use strftime("%H:%M"); for the time field and strftime("%d/%m/%Y"); for the date field it always adds exactly 4 hours to the time!

have I missed something somewhere or is this a bug?
can anyone shed any light on what I am doing wrong do I need to use setlocale(); if so where would I put it?
thank you

Kevan

Admin 1/13/2014

Kevan,
you need to contact your web hosting support in this regard. Time is taken on the server and my guess is that timezone set in php.ini either has an error in it or simply not applied. You do not need to change anything in PHPRunner project if correct timezone is set in php.ini.

Graphix author 1/14/2014



Kevan,
you need to contact your web hosting support in this regard. Time is taken on the server and my guess is that timezone set in php.ini either has an error in it or simply not applied. You do not need to change anything in PHPRunner project if correct timezone is set in php.ini.


Hi Sergey

it is my server I am running iis 7 on server 2008 64bit

php.ini:

;;;;;;;;;;;;;;;;;;;

; Module Settings ;

;;;;;;;;;;;;;;;;;;;
[Date]
; Defines the default timezone used by the date functions

date.timezone = "Europe/London"
date.default_latitude = 51.500181

date.default_longitude = -0.12619
;date.sunrise_zenith = 90.583333

;date.sunset_zenith = 90.583333
I have tried it with the quotes on and off still no joy it is exactly 4 hours fast.
phpinfo:

date

date/time support enabled

"Olson" Timezone Database Version 2011.8

Timezone Database internal

Default timezone Europe/London
Directive Local Value Master Value

date.default_latitude 51.500181 51.500181

date.default_longitude -0.12619 -0.12619

date.sunrise_zenith 90.583333 90.583333

date.sunset_zenith 90.583333 90.583333

date.timezone Europe/London Europe/London
server clock is identical to my pc clock ( I must point out I have not uploaded this project change yet and just testing with the browser preview,

does the phprunner preview use a different php.ini if the web version is not available?
regards

Kevan

Graphix author 1/14/2014



Hi Sergey

it is my server I am running iis 7 on server 2008 64bit

php.ini:

;;;;;;;;;;;;;;;;;;;

; Module Settings ;

;;;;;;;;;;;;;;;;;;;
[Date]
; Defines the default timezone used by the date functions

date.timezone = "Europe/London"
date.default_latitude = 51.500181

date.default_longitude = -0.12619
;date.sunrise_zenith = 90.583333

;date.sunset_zenith = 90.583333
I have tried it with the quotes on and off still no joy it is exactly 4 hours fast.
phpinfo:

date

date/time support enabled

"Olson" Timezone Database Version 2011.8

Timezone Database internal

Default timezone Europe/London
Directive Local Value Master Value

date.default_latitude 51.500181 51.500181

date.default_longitude -0.12619 -0.12619

date.sunrise_zenith 90.583333 90.583333

date.sunset_zenith 90.583333 90.583333

date.timezone Europe/London Europe/London
server clock is identical to my pc clock ( I must point out I have not uploaded this project change yet and just testing with the browser preview,

does the phprunner preview use a different php.ini if the web version is not available?
regards

Kevan


I can confirm uploading the project corrects the issue!!! how can I change the regional settings for the preview option?
thank you

Kevan

Graphix author 1/14/2014



I can confirm uploading the project corrects the issue!!! how can I change the regional settings for the preview option?
thank you

Kevan


LOL I answered my own question <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=73675&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

if anyone is interested there is a php.ini template that the preview uses on a default install you can find it

here C:\Program Files (x86)\PHPRunner7.0\EmbeddedServer\php

once I edited the date settings all is working as should.
thank you

Kevan