Click here to Skip to main content
15,917,321 members
Home / Discussions / C#
   

C#

 
GeneralRe: Query, DateTime Pin
Michael P Butler11-May-04 10:25
Michael P Butler11-May-04 10:25 
GeneralRe: Query, DateTime Pin
DougW4811-May-04 13:16
DougW4811-May-04 13:16 
GeneralRe: Query, DateTime Pin
Heath Stewart11-May-04 11:07
protectorHeath Stewart11-May-04 11:07 
GeneralRe: Query, DateTime Pin
DougW4811-May-04 15:02
DougW4811-May-04 15:02 
GeneralRe: Query, DateTime Pin
Heath Stewart11-May-04 16:21
protectorHeath Stewart11-May-04 16:21 
GeneralRe: Query, DateTime Pin
DougW4811-May-04 16:47
DougW4811-May-04 16:47 
GeneralRe: Query, DateTime Pin
DougW4811-May-04 18:07
DougW4811-May-04 18:07 
Generalsetting time on Zip Entry Pin
elena1234511-May-04 8:09
elena1234511-May-04 8:09 
I am zipping up a bunch of files and "Modified" date on the files always turns out to be 1/1/1980 12:00AM
The date I have is in DateTime format, and I tried
zipEntry.setDate(d.ToFileTimeUtc())
zipEntry.setDate(d.ToFileTimeUtc())
zipEntry.setDate(d.ToFileTime())
zipEntry.setDate(d.Ticks)
Nothing works!!! It keeps on getting 1/1/1980 12:00AM

Do you have any idea why this is not working?
Code:
<br />
<br />
ZipEntry currententry = new ZipEntry(localPath);<br />
currententry.setMethod(ZipEntry.DEFLATED);                                <br />
currententry.setTime(createDate.ToFileTimeUtc());                  <br />
<br />
m_zipstream.putNextEntry(currententry);                <br />
                <br />
try<br />
{                    <br />
   java.io.FileInputStream current = new java.io.FileInputStream(fullPath);                    <br />
   try<br />
   {<br />
     sbyte[] buffer = new sbyte[8192];<br />
     int     buffercount;<br />
 <br />
     while ((buffercount = current.read(buffer, 0, buffer.Length)) > 0)<br />
       m_zipstream.write(buffer, 0, buffercount);                                                <br />
   }<br />
   finally { current.close(); }                    <br />
}<br />
finally { m_zipstream.closeEntry(); }<br />


Thanks,

Elena
GeneralRe: setting time on Zip Entry Pin
Jeff Varszegi11-May-04 9:00
professionalJeff Varszegi11-May-04 9:00 
GeneralRe: setting time on Zip Entry Pin
Heath Stewart11-May-04 9:20
protectorHeath Stewart11-May-04 9:20 
GeneralRe: setting time on Zip Entry Pin
Jeff Varszegi12-May-04 6:58
professionalJeff Varszegi12-May-04 6:58 
GeneralRe: setting time on Zip Entry Pin
Heath Stewart12-May-04 7:38
protectorHeath Stewart12-May-04 7:38 
GeneralRe: setting time on Zip Entry Pin
Heath Stewart11-May-04 9:10
protectorHeath Stewart11-May-04 9:10 
GeneralRe: setting time on Zip Entry Pin
elena1234511-May-04 11:10
elena1234511-May-04 11:10 
GeneralRe: setting time on Zip Entry Pin
Heath Stewart11-May-04 11:13
protectorHeath Stewart11-May-04 11:13 
Generalpopup tip on form Pin
cchere11-May-04 8:02
cchere11-May-04 8:02 
GeneralRe: popup tip on form Pin
Heath Stewart11-May-04 8:54
protectorHeath Stewart11-May-04 8:54 
GeneralRe: popup tip on form Pin
cchere13-May-04 12:32
cchere13-May-04 12:32 
GeneralRounded numbers in C# Pin
spyforcer11-May-04 5:51
spyforcer11-May-04 5:51 
GeneralRe: Rounded numbers in C# Pin
Jeff Varszegi11-May-04 6:35
professionalJeff Varszegi11-May-04 6:35 
GeneralRe: Rounded numbers in C# Pin
spyforcer11-May-04 21:02
spyforcer11-May-04 21:02 
GeneralRe: Rounded numbers in C# Pin
Jeff Varszegi12-May-04 6:57
professionalJeff Varszegi12-May-04 6:57 
GeneralRe: Rounded numbers in C# Pin
Heath Stewart11-May-04 6:40
protectorHeath Stewart11-May-04 6:40 
GeneralRe: Rounded numbers in C# Pin
spyforcer11-May-04 21:27
spyforcer11-May-04 21:27 
GeneralCleaning a Stream Pin
Snowjim11-May-04 5:29
Snowjim11-May-04 5:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.