IsNewDay()

Nightmist

Member
Just wondering if anyone knows a way of checking if it is a new day (read as "after rollover from last time this script ran") in KoL without hitting the servers? The best I've come up with is using today_to_string() but then its not based on rollover but rather your computer clock which isn't timed to rollover. (Unless your in Arizona)

How does the buffbot philanthropic buffs system maintain the limit to 1 per day? (Is it a proper 1 per day or is it a "1 per time I am forced to restart the buffbot module"?)
 

holatuwol

Developer
It uses the same date formatter that today_to_string uses, and the date formatter has been updated to assume EDT, which will make it near-accurate for rollover detection purposes until Daylight Saving Time ends.
 

Nightmist

Member
=D *Is happy*, No need to hammer the server each time the "TradeBot" script runs! (I'm adding limits to it... err added limiting to it and I figured I would try to stick to the current mall "limit per day" sort of system instead of a weird "to my local clock" system)
 
Top