I have written an FTP Program for my special needs. What does not work is the filetime which I get
Code: Select all
MDate = FTPDirectoryEntryDate(FTP)
Postcard10c.jpg|1206338400|186673|24.03.2008 06:00:00|
Kopie von Postcard10c.jpg|1202623200|175930|10.02.2008 06:00:00|
Image2a.png|1206338400|265693|24.03.2008 06:00:00|
Image2.png|1202623200|162436|10.02.2008 06:00:00|
Image1a.png|1206338400|80214|24.03.2008 06:00:00|
Image10c.png|1206338400|429193|24.03.2008 06:00:00|
Image10a.png|1206338400|332372|24.03.2008 06:00:00|
Image1.psd|1202623200|1373386|10.02.2008 06:00:00|
Image1.png|1202623200|375143|10.02.2008 06:00:00|
gutar(Frame 9).gif|1198303200|95161|22.12.2007 06:00:00|
gutar(Frame .gif|1198303200|95244|22.12.2007 06:00:00|
gutar(Frame 7).gif|1198303200|95111|22.12.2007 06:00:00|
gutar(Frame 6).gif|1198303200|95158|22.12.2007 06:00:00|
gutar(Frame 5).gif|1198303200|95546|22.12.2007 06:00:00|
gutar(Frame 4).gif|1198303200|94927|22.12.2007 06:00:00|
gutar(Frame 3).gif|1198303200|95103|22.12.2007 06:00:00|
gutar(Frame 2).gif|1198303200|95093|22.12.2007 06:00:00|
gutar(Frame 17).gif|1198303200|95222|22.12.2007 06:00:00|
gutar(Frame 16).gif|1198303200|95196|22.12.2007 06:00:00|
gutar(Frame 15).gif|1198303200|95210|22.12.2007 06:00:00|
gutar(Frame 14).gif|1198303200|95162|22.12.2007 06:00:00|
gutar(Frame 13).gif|1198303200|95571|22.12.2007 06:00:00|
gutar(Frame 12).gif|1198303200|94938|22.12.2007 06:00:00|
gutar(Frame 11).gif|1198303200|95222|22.12.2007 06:00:00|
gutar(Frame 10).gif|1198303200|95110|22.12.2007 06:00:00|
gutar(Frame 1).gif|1198303200|95019|22.12.2007 06:00:00|
Code: Select all
If NextFTPDirectoryEntry(FTP)
If FTPDirectoryEntryType(FTP) = 1 ; 1=File 2=Dir
AddElement(FList())
FTPii+1
MDate=FTPDirectoryEntryDate(FTP)
MDate+3600 * Val(GetGadgetText(ServerTimeAdd1)) ; the hours the servertime differs
FList()=FTPDirectoryEntryName(FTP)+"|"+Str(MDate)+"|"+Str(FTPDirectoryEntrySize(FTP))+"|"+FormatDate("%dd.%mm.%yyyy %hh:%ii:%ss", MDate)+"|"
Debug FList()
EndIf
If FTPDirectoryEntryType(FTP) = 2 ; 1=File 2=Dir
FTPDii+1
AddElement(DList())
MDate=FTPDirectoryEntryDate(FTP)
MDate+3600 * Val(GetGadgetText(ServerTimeAdd1)) ; the hours the servertime differs
DList()=FTPDirectoryEntryName(FTP)+"|"+Str(MDate)+"||"+FormatDate("%dd.%mm.%yyyy %hh:%ii:%ss", MDate)+"|"
Debug DList()
EndIf
Else
Break
EndIf
Filename|date|size|formatted date|
Postcard10c.jpg|1206417899|186673|25.03.2008 04:04:59|
Kopie von Postcard10c.jpg|1202660770|175930|10.02.2008 16:26:10|
Image2a.png|1206417526|265693|25.03.2008 03:58:46|
Image2.png|1202660269|162436|10.02.2008 16:17:49|
Image1a.png|1206417509|80214|25.03.2008 03:58:29|
Image10c.png|1206417882|429193|25.03.2008 04:04:42|
Image10a.png|1206417799|332372|25.03.2008 04:03:19|
Image1.psd|1202660751|1373386|10.02.2008 16:25:51|
Image1.png|1202660277|375143|10.02.2008 16:17:57|
gutar(Frame 9).gif|1198381690|95161|23.12.2007 03:48:10|
gutar(Frame .gif|1198381674|95244|23.12.2007 03:47:54|
gutar(Frame 7).gif|1198381661|95111|23.12.2007 03:47:41|
gutar(Frame 6).gif|1198381653|95158|23.12.2007 03:47:33|
gutar(Frame 5).gif|1198381644|95546|23.12.2007 03:47:24|
gutar(Frame 4).gif|1198381635|94927|23.12.2007 03:47:15|
gutar(Frame 3).gif|1198381628|95103|23.12.2007 03:47:08|
gutar(Frame 2).gif|1198381619|95093|23.12.2007 03:46:59|
gutar(Frame 17).gif|1198381760|95222|23.12.2007 03:49:20|
gutar(Frame 16).gif|1198381753|95196|23.12.2007 03:49:13|
gutar(Frame 15).gif|1198381745|95210|23.12.2007 03:49:05|
gutar(Frame 14).gif|1198381736|95162|23.12.2007 03:48:56|
gutar(Frame 13).gif|1198381729|95571|23.12.2007 03:48:49|
gutar(Frame 12).gif|1198381720|94938|23.12.2007 03:48:40|
gutar(Frame 11).gif|1198381710|95222|23.12.2007 03:48:30|
gutar(Frame 10).gif|1198381699|95110|23.12.2007 03:48:19|
gutar(Frame 1).gif|1198381546|95019|23.12.2007 03:45:46|
I want to have a 100 % mirror Server - PC
So it is important, that the dates are exact the same.
The FTP commandset of PureBasic misses SetFiledate on the server - so I quickly wrote a php program which fills that gap until I find a better solution
I send a file with a list (as seen above) with the exact dates together with the uploaded files and the php-program runs every 15 minutes (Scheduled Job) to look if there are files to have be corrected ...
Anyway - WinSCP shows on the second exact dates, my php programs show the exact dates - only PureBasic does not - is my program wrong? Or did no-one notice that bug before?
Have a nice day everybody