NukeXchange Network

          

Nuke Sites Link Directory
Nuke Fixes · NukeForums · NukeZone Hosting · Nuke Sites · Nuke Skins
Nuke Resources
 :: Home  :: Downloads  :: Your Account  :: Forums  :: Advertise :: 
Login or Register
Main Menu
General
 Main
 AvantGo
 Banner_Clients
 cfaq
 Donations
 Downloads
 Forums
 Members_List
 Private_Messages
 Search
 Stories_Archive
 Submit_News
 Surveys
 Topics
 Web_Links
 Your_Account

Your Account
 Login
 Register
 Lost Pass

Modules
Quick Links
· Domain Names
. Game Quest
· Learning Linux
. MateMaker
· NukeFixes
· NukeForums
· Nuke Sites
· Nuke Skins
· NukeZone Hosting
. SearchDevil
Other Options

Download Resources
· Nuke Downloads
· Add a Link
· New Files
· Top Rated
· Most Popular

Web Site Resources
· Nuke Sites
· Add A Site
· New Sites
· Top Rated
· Most Popular

Support
· NukeZone Hosting
· NukeSkins.com
· NukeForums.com
· phpnuke.org
· NukeFixes.com
Information
NukeForums
·php nuke background
·Php nuke one click install on plesk 10.4
·Blocks
·vbulletin migration
·How would I add a clickable link in a Modules Block?
·eregi_replace() is deprecated
·Admin Security login jpeg not showing
·PHP-NUKE CALENDAR MODULE. Does it exist?
·God Account
·Security Code showing up for everything EXCEPT new user reg

read more...
Top10 Links
· 1: Nuke Forums
· 2: Windows Installation: PHP
· 3: PHPNukeFiles
· 4: NukeSkins
· 5: Nuke Templates
· 6: EcomJunk
· 7: MDesign
· 8: FLASH-FOR-NUKE
· 9: Dezina
· 10: Global Dream News Sharing Portal!
Site Visitors
User Login:

Nickname:
Password:
Security Code: Security Code
Type Security Code Here:

Members List Membership:
Latest: door752
Today: 0
Yesterday: 0
Overall: 15848

Visitation:
Guests: 236
Members: 0
Total: 236


You are Anonymous user. You can register for free by clicking here
Sponsor Links
Nuke Sites Link Directory
Nuke Sites Link Directory

NukeResources :: View topic - Locale time format help please
NukeResources Forum Index

NukeResources Forum Index -> Bug Fixes -> Locale time format help please
Post new topic  Reply to topic    View previous topic :: View next topic 
Locale time format help please
PostPosted: Thu Jun 08, 2006 2:38 am Reply with quote
yanger
Resource Seeker
Resource Seeker
 
Joined: Apr 10, 2006
Posts: 10




Hello again everyone...

I have yet another problem on my site that i wants fixed very badly,

I am from india and i don't know how to fix the local time format. In my Perferences page the locale time format is en_US, since USA is a date behind India the date on my site shows a date late, i want to change it to Indian date,, what format should i use??? will it be something like this??? en_IN or.... please help...

I need a fix to this very urgently someone please help. Since my site deals with Daily local news, showing the wrong date on the News Articles bugs our readers. Help...
View user's profile Send private message
PostPosted: Fri Jun 09, 2006 2:01 pm Reply with quote
Evaders99
Resource Master
Resource Master
 
Joined: May 25, 2004
Posts: 1796




Unfortunately the date is set to read the local server time. You would need to get the host to change the time.

_________________
- Star Wars Rebellion Network - Evaders Squadron Coding -

Need help? Nuke Patched Core, Coding Services, Webmaster Services
View user's profile Send private message Visit poster's website AIM Address
PostPosted: Fri Jun 09, 2006 2:18 pm Reply with quote
Dove
Resourceful
Resourceful
 
Joined: Mar 17, 2004
Posts: 140
Location: USA




Hello,
maybe you could try to fake it out -->

Say you need to add 12 hours (+12)
Open your mainfile and find:

Code:

function formatTimestamp($time) {
    global $datetime, $locale;
    setlocale (LC_TIME, $locale);
    ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
    // We've got to use strftime to use the $locale var
    $datetime = strftime(""._DATESTRING."", mktime($datetime[4]+12,$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
    $datetime = ucfirst($datetime);
    return $datetime;
}

Notice in there where it says
Code:
mktime($datetime[4]+12,

I added the +12 to adjust it or add 12 hours more.... add or subtract whatever you need.
To subtract hours just use -12 etc.

There's more info HERE
It also shows you how to change the way it looks if needed (datestring)
Smile
View user's profile Send private message
PostPosted: Sat Jun 10, 2006 8:42 pm Reply with quote
darklord
Resourceful
Resourceful
 
Joined: Feb 25, 2006
Posts: 210




u should read that more carefully...not +12 but +43200

its in seconds not hours.

_________________

for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
PostPosted: Mon Jun 12, 2006 2:44 am Reply with quote
yanger
Resource Seeker
Resource Seeker
 
Joined: Apr 10, 2006
Posts: 10




dear all, thank you all very much for your help... With help from all of you my site is working fine now. Thank you all again very much.
God Bless.
View user's profile Send private message
Locale time format help please
 NukeResources Forum Index -> Bug Fixes
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 4 Hours  
Page 1 of 1  

  
  
 Post new topic  Reply to topic     



Powered by phpBB © 2001-2005 phpBB Group.     Theme created by Vjacheslav Trushkin.
There have been 93 unique hit(s) in the past 24 hours.
Forums ©
Game Quest Online - Games and more!


Best viewed with a Browser
All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2001 - 2007 by NukeResources.com
You can syndicate our news using the file .backend.php or ultramode.txt
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.28 Seconds

:: Eos phpbb2 style by Cyberalien :: PHP-Nuke theme by www.nukemods.com ::