• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ Contributions (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

date modification

Post a bug fix, a new feature, a theme ...

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
5 posts • Page 1 of 1

Postby krater » Mon Apr 10, 2006 2:22 pm

hello,

My board and this chat has installed on a Canadian server, but it is a french site. So the server hours is wrong.

In the chat, the hours indication was late about 6 hours. So with a co-admin we decided to change that.

here is code :
before :
$line .= date("H:i:s")."t";

after :
$heure = date("H");
$heure += 6;
$line .= $heure.":".date("i:s")."t";

I think it is the begining of an option for the chat same as the theme, or the language ;) )

I hope I help You
krater
New member
 
Posts: 1
Joined: Fri Apr 07, 2006 3:57 pm
Location: france
  • Website
Top

Postby phpfreechat » Mon Apr 10, 2006 2:54 pm

A better idea would be to detect automaticaly the date/hours lag between server and client.
Javascript can help to detect the client time.

Whould be nice if someone could submit a such patch.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Fredkl » Fri Dec 01, 2006 9:50 am

Hi,
I modified as follow to get local time.
Simple but work.
You need you need to specify time difference : $hourdiff = your time difference.


// format message
$hourdiff = "8";
$timeadjust = ($hourdiff * 3600);
$data = "n";
$data .= $msgid."t";
//$melbdate = date("l, d F Y h:i a");
$data .= date("d/m/Y-H:i:s",time() + $timeadjust)."t";
$data .= date("")."t";
$data .= $nick."t";
$data .= $cmd."t";
$data .= $param;
Fredkl
New member
 
Posts: 4
Joined: Fri Dec 01, 2006 9:45 am
Top

Postby primster7 » Sun Apr 15, 2007 6:22 pm

Fredkl wrote:Hi,
I modified as follow to get local time.
Simple but work.
You need you need to specify time difference : $hourdiff = your time difference.


// format message
$hourdiff = "8";
$timeadjust = ($hourdiff * 3600);
$data = "n";
$data .= $msgid."t";
//$melbdate = date("l, d F Y h:i a");
$data .= date("d/m/Y-H:i:s",time() + $timeadjust)."t";
$data .= date("")."t";
$data .= $nick."t";
$data .= $cmd."t";
$data .= $param;

What file do you add this to?
primster7
New member
 
Posts: 2
Joined: Sat Apr 14, 2007 7:27 am
Top

Postby Peter » Mon May 07, 2007 3:05 pm

Perhaps this can be helpful.
Last edited by Peter on Mon May 07, 2007 9:39 pm, edited 1 time in total.
Peter
New member
 
Posts: 5
Joined: Mon May 07, 2007 2:55 pm
Top


Post a reply
5 posts • Page 1 of 1

Return to Contributions (v1.x)

Who is online

Users browsing this forum: No registered users and 3 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub