1 sam2kb Jan 01, 2008 13:30
3 yabba Jan 01, 2008 15:23
inc/_vars.inc.php approx 228, change it to loo like this and see if it cures things ;)
// the months
$month['00'] = '\?\?'; // This can happen when importing junk dates from WordPress
¥
4 sam2kb Jan 01, 2008 20:18
It fixes the bug, at least for me.
Thanks
5 afwas Jan 01, 2008 21:16
¥åßßå should go in politics. His one-liners are brilliant.
6 yabba Jan 02, 2008 00:24
Afwas wrote:
¥åßßå should go in politics. His one-liners are brilliant.
:O how dare you suggest that I could become a conniving bastard that's only interested in looking after their own pocket at the expense of the country !!!!! ..... or is that just UK politics? *angelic look*
Glad it fixed it, I'll commit the change when I sober up :D
Happy New Year ;)
¥
7 hairball Jan 03, 2008 10:43
I'm using this
$MainList->date_if_changed( array(
'before' => '<h2>',
'after' => '</h2>',
'date_format' => '\D\a\y z \o\f \W\e\e\k W l F, d Y',
) );
Since I update now getting the following:
Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (? at offset 63 in /home/inthehol/public_html/inc/_core/_param.funcs.php on line 604
Warning: Cannot modify header information - headers already sent by (output started at /home/inthehol/public_html/inc/_core/_param.funcs.php:604) in /home/inthehol/public_html/skins_adm/_html_header.inc.php on line 40
8 sam2kb Jan 03, 2008 10:45
Did you apply this patch ?
$month['00'] = '\?\?';
9 hairball Jan 03, 2008 10:48
¥åßßå wrote:
inc/_vars.inc.php approx 228, change it to loo like this and see if it cures things ;)
// the months $month['00'] = '\?\?'; // This can happen when importing junk dates from WordPress
¥
This is not imported worpress
10 sam2kb Jan 03, 2008 10:51
Doesn't matter. I didn't import anything from wordpress but this patch fixed the error. Just try.
11 yabba Jan 03, 2008 10:51
It doesn't matter if it's imported WP or not, it still screws up the regex for long dates ;)
¥
12 hairball Jan 03, 2008 10:55
gotcha ..... :) Works
13 hairball Jan 03, 2008 10:58
one other thing I did take notice is it shows the day as 0 for Jan. 01 2008 and day 1 for Jan. 02 2008
14 hairball Jan 03, 2008 11:22
also didn't take notice till now that if I edit a day like I did for December 31, it shows the date as Day 364 of Week 01.
The last time I looked there was 365 days to a year and the first day of the year was Day 1 not 0.
15 yabba Jan 03, 2008 11:39
lol, stop editing posts then :|
I'll take a look and see if I can see what causes it ;)
¥
16 hairball Jan 04, 2008 03:57
¥åßßå wrote:
lol, stop editing posts then :|
I'll take a look and see if I can see what causes it ;)
¥
Sorry have insomnia been 8| now 2 days :!:
17 hairball Jan 19, 2008 15:22
today is the 19th day of 2008 but b2evolution 2.3.0-rc1 “Renaissance” shows the day being the 18th day ?
18 sam2kb Jan 19, 2008 15:34
Did you check time in Tools -> System
Server time 01/19/08 - 09:27:21 am
GMT / UTC time 01/19/08 - 02:27:21 pm
b2evolution time 01/19/08 - 09:27:21 am
19 yabba Jan 19, 2008 15:50
I've just tried this on my 2.3 and it shows the correct date ?
I've just committed the change to cvs so it should show on the demo soon. Have a play and see if it works there
¥
20 hairball Jan 19, 2008 16:04
OK maybe this went over your head(not being a smart ass :lol: ) if you take a look at my blog at http://www.intheholler.net you will notice that it shows Day 18 of Week 03 Saturday January, 19 2008.
It seems to me that the last time I looked today would be Day 19(NOT DAY 18) of week 03 January, 19 2008.
21 yabba Jan 19, 2008 16:21
How cool, that would appear to be a php bug :
<?php
echo date( 'z' );
?>
¥
22 yabba Jan 19, 2008 16:26
oops, correction :
z The day of the year (starting from 0) 0 through 365
php.net : [url=http://uk.php.net/manual/en/function.date.php]date()[/url]
¥
23 hairball Jan 19, 2008 16:29
any ideas how to fix I'm outta options I don't know very much about php so I am of no help.
24 hairball Jan 19, 2008 16:39
I believe it should be as 1 through 365.
0 is not a day on my calendar it shows January 1, 2008 not January 0, 2008
this should be addressed this is not correct there is not 366 days in a year.
25 yabba Jan 19, 2008 17:24
You'd need to hack the core to "fix" this.
inc/_core/_misc.funcs.php approx 438
/*
Special symbols:
'b': wether it's today (1) or not (0)
'l': weekday
'D': weekday abbrev
'e': weekday letter
'F': month
'M': month abbrev
*/
#echo $dateformatstring, '<br />';
// protect special symbols, that date() would need proper locale set for
$protected_dateformatstring = preg_replace( '/(?<!\\\)([zblDeFM])/', '@@@\\\$1@@@', $dateformatstring );
#echo $protected_dateformatstring, '<br />';
$r = date( $protected_dateformatstring, $unixtimestamp );
if( $protected_dateformatstring != $dateformatstring )
{ // we had special symbols, replace them
$istoday = ( date('Ymd',$unixtimestamp) == date('Ymd',$localtimenow) ) ? '1' : '0';
$datemonth = date('m', $unixtimestamp);
$dateweekday = date('w', $unixtimestamp);
// replace special symbols
$r = str_replace( array(
'@@@b@@@',
'@@@l@@@',
'@@@D@@@',
'@@@e@@@',
'@@@F@@@',
'@@@M@@@',
'@@@z@@@',
),
array( $istoday,
trim(T_($weekday[$dateweekday])),
trim(T_($weekday_abbrev[$dateweekday])),
trim(T_($weekday_letter[$dateweekday])),
trim(T_($month[$datemonth])),
trim(T_($month_abbrev[$datemonth])),
date('z',$unixtimestamp ) + 1 ),
$r );
this should be addressed this is not correct there is not 366 days in a year.
There is this year ;)
¥
26 edb Jan 19, 2008 17:33
Then what'll happen is PHP will fix it and you'll end up with 2 - 366 8|
27 hairball Jan 19, 2008 18:16
thanks now that looks better
28 yabba Jan 19, 2008 18:18
No problem, you will need to redo your changes if you update as this won't be in the core
EdB wrote:
Then what'll happen is PHP will fix it and you'll end up with 2 - 366 8|
Ain't that the truth :p ( 2 -> 367 though ;) )
¥
Thanks. I am sure somebody will look into these date / time problems soon.
Good luck