time again but re: 0.7x and new entries in future time

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
ekhoo
Regular
Posts: 17
Joined: Mon Aug 09, 2004 1:12 pm

time again but re: 0.7x and new entries in future time

Post by ekhoo »

I've been working around the lack of timezone functionality but just manually changing the time each time I post to my blog. I'm around +13 hrs ahead of my server so it's not very difficult to manually change the posting time.

I upgraded to 0.7rc-1 and it no longer displays future entries. Is there somewhere I can change to allow it to display future entries?
Little Hamster
Regular
Posts: 62
Joined: Thu Oct 07, 2004 3:16 pm

Post by Little Hamster »

I upgraded to 0.7rc-1 and it no longer displays future entries.
I believe future posting is one of the new features added in 0.7.

As for displaying a different time than in the server, it's been asked before. I don't think there's a easy solution (other than ignoring the difference :))
ekhoo
Regular
Posts: 17
Joined: Mon Aug 09, 2004 1:12 pm

Post by ekhoo »

I noticed that and also found that out while searching this forum.
However, would it be possible to disable the future posting system?
I post mostly in the future anyways (due to my timezone being 13 hours ahead of the server).
Little Hamster
Regular
Posts: 62
Joined: Thu Oct 07, 2004 3:16 pm

Post by Little Hamster »

I can suggest a dirty hack, I haven't tried it myself, but it could be a start.

The entries are fetched using serendity_fetchEntries(...) in serendipity_functions.inc.php.

It seems to be the time limiting code is in line 710 and 712. By adding a day (or 13 hours in your case) to time(), you can change the sql query to e.timestamp <= 13 hours ahead instead. What I mean is

Code: Select all

$and .= " AND e.timestamp <= '" . time() . "'";
$and = "WHERE e.timestamp <= '" . time() . "'";
become

Code: Select all

$and .= " AND e.timestamp <= '" . time() + 60*60*14 . "'";
$and = "WHERE e.timestamp <= '" . time() + 60*60*14 . "'";
This should add 14 hours to time(). If you go through the functions in the file, you might be able to change the display time on the blog as well.
Last edited by Little Hamster on Mon Nov 01, 2004 10:36 pm, edited 1 time in total.
ekhoo
Regular
Posts: 17
Joined: Mon Aug 09, 2004 1:12 pm

Post by ekhoo »

Thanks. :D
It works like a charm now. I've put it forward 13 hrs.
Mostly ok except for daylight savings but no biggie.

BTW, hope you don't mind me asking, where's the new entry page? I could increment the default date/time filled there by 13hrs...
ekhoo
Regular
Posts: 17
Joined: Mon Aug 09, 2004 1:12 pm

Post by ekhoo »

oops... no worries - Found it in line 2908...
Post Reply