#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    5
    Rep Power
    0

    Help With Timezone Javascript


    Greetings,
    Firstly let me state that i dont have any experience with javascripting.

    Well i Have been using this javascript code for me site and everything works fine with the timezoe convervion.
    Only thing is If i input the times in 12Hr format Ie. 4:45 or 4:45 pm it displays in the same format, If i try input the time as 24hr format I.e. 16:45 or 16:45 pm it displays the 12hr output ie. 4:45 pm

    Can anyone please help with changing the script below to output the info to the user in 24 hr format, Or how i can input the time into the script so that it displays in 24 hour format.

    This is the code where the times are entered

    Code:
    <script>new TTZC.Widget({  version:'inline',  t:'16:45',  tz:'London'}).display();</script>
    And this is the js file code can be foud here

    http://www.thetimezoneconverter.com/js/ttzc.js
    (code is to long to post and this is the source, im just using the script for my site to display times to users in there timezone)

    If anyone is abale to assist in telling me which values must be changed to which in the js file or able to even do the changes for me or explain how to display the output in 24hr format would be greatly apreciated.
    Thank you for your time
    Kind Regards

    Kind Regards
  2. #2
  3. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,176
    Rep Power
    184
    I think I would contact the author and see if there is a parameter to add to your function; that would automatically convert to military time, without having to click the link (provided at the bottom of the The Time Zone Converter widget). I was looking at the site and there is not a whole lot of documentation with this widget, so that might be your best bet... to contact the widget author.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    5
    Rep Power
    0
    Originally Posted by web_loone08
    I think I would contact the author and see if there is a parameter to add to your function; that would automatically convert to military time, without having to click the link (provided at the bottom of the The Time Zone Converter widget). I was looking at the site and there is not a whole lot of documentation with this widget, so that might be your best bet... to contact the widget author.
    Thank you, but i did come right with another script

IMN logo majestic logo threadwatch logo seochat tools logo