PDA

View Full Version : Newdate with timeoffset


eger
08-09-2005, 04:25 PM
Wondering if anyone knows of a newdate script that has a time offset than can be used for different timezones to create newdates for the UTC date when the PST dat is still the previous day.

I've tried ioA and ioZS newdate and both only create yesterdays date or the current date. I am in PST timezone and want to create 08/10 date when it is 3pm 08/09.

Not sure which newdate supports this...

Any ideas?

FTPServerTools
08-10-2005, 03:12 AM
NewDay.exe
Timeoffset can be set in hours or days. Also you can set previous and coming days chmod so for example close down yesterday for upload.

eger
08-10-2005, 11:42 AM
Thanks FTPServerTools

I got yours to work the way I wanted. The only thing it misses is a !putlog for announcing. Then it would be the only NewDay script with timeoffset!

If anyone is interested I made this simple batch file to make !putlog for a single dir:

@ECHO OFF
CD c:\ioFTPD\scripts\NewDay\
date.exe -d tomorrow +%%m%%d > date.tmp
date.exe -d now +%%m%%d > yest.tmp

FOR /F %%a IN (date.tmp) DO (SET date=%%a)
FOR /F %%a IN (yest.tmp) DO (SET yest=%%a)

ECHO Todays Date: %date%
ECHO Yesterday: %yest%
NewDay.exe
ECHO !putlog NEWDATE: "/MP3/%date%" "A new Day has come!"

It requires date.exe from: http://unxutils.sourceforge.net/

Was the fastest way for me to get tomorrows date as a string for use in !putlog echo.

FTPServerTools
08-10-2005, 05:03 PM
Well it was build for automation, just dump it somewhere in the scheduler and forget about it.. :)