Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder Donkey's Avatar
    Join Date
    Sep 2003
    Location
    Blackfield UK
    Posts
    312
    Thanks
    1
    Thanked 36 Times in 36 Posts

    SSI Time Zone Problem

    I have found only two choices so far:

    Code:
    <!--#echo var="DATE_LOCAL" -->
    gives me the local time at the host's server

    Code:
    <!--#echo var="DATE_GMT" -->
    gives me GMT.


    I am in the UK, my host is in Germany.


    Is there a version that will give me my local time i.e. so that it changes from

    23 March 2007 15:00 GMT
    to
    29 March 2007 15:00 BST

    Without me changing the pages manually.

    I'd rather not use javascript or PHP so can anyone help with a nice easy SSI solution?

    Many thanks.
    " 90% of everything is crud" - Theodore Sturgeon
    Filthy Beast - a 60's Rock Band

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,640
    Thanks
    0
    Thanked 649 Times in 639 Posts
    SSI doesn't allow you to do any calculations and so you are stuck with local time and GMT which are the only ways of extracting it. To get a specific timezone you need to extract it as GMT and then use PHP to apply the appropriate offset.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •