Yii Framework Forum: app time - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

app time Rate Topic: -----

#1 User is offline   mithereal 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 67
  • Joined: 14-April 10
  • Location:The Radioactive Desert, AZ

Posted 14 May 2010 - 03:40 AM

simple question how do i get the current time the app was run. basically i have mulitple users and i need to get the time relative to the current logged in users timezone. i read somewhere yii supports users localetime. so i guess im asking how do i make yii get the current users timestamp any ideas??
0

#2 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,013
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 14 May 2010 - 04:15 AM

Timezone information is not part of the request header. So all you know about your visitor is his IP. You could try to resolve that to a country and use a lookup table to find the corresponding timezone.
0

#3 User is offline   resplendent 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 60
  • Joined: 22-May 09
  • Location:Singapore

Posted 14 May 2010 - 04:35 AM

Hi,

You might want to read more about GEOIP, which is a package that detect the user country.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users