vze3k59w wrote: did you run the install file?
I-S-S wrote: After this message appeared, the column in the DST time lag " D d M, Y g:i a"
What is wrong this time?
Which MOD did you apply (not only the db update/upgrade file)?
The full one or just the upgrade one?
I think you missed some instructions.
Check carefully ALL the instructions in usercp_avatar.php & inludes/usercp_register.php![]()
mr.luc wrote: 1. override user settings:
if for example option 4 or 5 are selected by admin, you can set a button to override the usersettings.
2. if usersettings are overridden, the user panel for dst and for timezone are hidden to user..
I-S-S wrote: when I upload those two files, I saw the difference between the new user_avatar.php and the old user_avatar.php.
Code: Select all
#
#-------[ FIND ]-----------------------------------------
#
return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz));
#
#------[ REPLACE WITH ]----------------------------------
#
// Fix for Daylight Savings Time
$dst = date('I', $gmepoch) * 3600;
return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz) + $dst), $translate) : @gmdate($format, $gmepoch + (3600 * $tz) + $dst);
#
#------{ SAVE/CLOSE ALL FILES ]--------------------------
#
# EoM
Code: Select all
<script>
var dayarray=new Array("Sun","Mon","Tues","Wed","Thur","Fri","Sat")
var montharray=new Array("January","February","March","April","May","June","July","August","September",
"October","November","December")
function getthedate()
{
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12)
{
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate=(dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+minutes+":"+seconds+" "+dn)
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit()
{
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}
</script>
<span id="clock"></span>
and then in the overall_header.tpl, in the <body> tag, this should be added:
onLoad="goforit()"
Code: Select all
<head>
<script>
var dayarray=new Array("Sun","Mon","Tues","Wed","Thur","Fri","Sat")
var montharray=new Array("January","February","March","April","May","June","July","August","September",
"October","November","December")
function getthedate()
{
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12)
{
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate=(dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+minutes+":"+seconds+" "+dn)
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit()
{
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}
</script>
<span id="clock"></span>
</head>
<body onLoad="goforit()">
-=ET=- wrote: OK.
No my MOD will affect the time of this digital clock.
But this digital clock does NOT need to be affected.
This code is a JS script, so it takes its time on the user's PC.
Then, if the user's PC manage DST, this clock will be on time without anything to change.