Click here to Skip to main content
15,843,322 members
Home / Discussions / C#
   

C#

 
GeneralRe: Query, DateTime Pin
Michael P Butler11-May-04 11:25
Michael P Butler11-May-04 11:25 
GeneralRe: Query, DateTime Pin
DougW4811-May-04 14:16
DougW4811-May-04 14:16 
GeneralRe: Query, DateTime Pin
Heath Stewart11-May-04 12:07
protectorHeath Stewart11-May-04 12:07 
GeneralRe: Query, DateTime Pin
DougW4811-May-04 16:02
DougW4811-May-04 16:02 
GeneralRe: Query, DateTime Pin
Heath Stewart11-May-04 17:21
protectorHeath Stewart11-May-04 17:21 
GeneralRe: Query, DateTime Pin
DougW4811-May-04 17:47
DougW4811-May-04 17:47 
GeneralRe: Query, DateTime Pin
DougW4811-May-04 19:07
DougW4811-May-04 19:07 
Generalsetting time on Zip Entry Pin
elena1234511-May-04 9:09
elena1234511-May-04 9: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 10:00
professionalJeff Varszegi11-May-04 10:00 
GeneralRe: setting time on Zip Entry Pin
Heath Stewart11-May-04 10:20
protectorHeath Stewart11-May-04 10:20 
GeneralRe: setting time on Zip Entry Pin
Jeff Varszegi12-May-04 7:58
professionalJeff Varszegi12-May-04 7:58 
GeneralRe: setting time on Zip Entry Pin
Heath Stewart12-May-04 8:38
protectorHeath Stewart12-May-04 8:38 
GeneralRe: setting time on Zip Entry Pin
Heath Stewart11-May-04 10:10
protectorHeath Stewart11-May-04 10:10 
GeneralRe: setting time on Zip Entry Pin
elena1234511-May-04 12:10
elena1234511-May-04 12:10 
GeneralRe: setting time on Zip Entry Pin
Heath Stewart11-May-04 12:13
protectorHeath Stewart11-May-04 12:13 
Generalpopup tip on form Pin
cchere11-May-04 9:02
cchere11-May-04 9:02 
GeneralRe: popup tip on form Pin
Heath Stewart11-May-04 9:54
protectorHeath Stewart11-May-04 9:54 
GeneralRe: popup tip on form Pin
cchere13-May-04 13:32
cchere13-May-04 13:32 
GeneralRounded numbers in C# Pin
spyforcer11-May-04 6:51
spyforcer11-May-04 6:51 
GeneralRe: Rounded numbers in C# Pin
Jeff Varszegi11-May-04 7:35
professionalJeff Varszegi11-May-04 7:35 
GeneralRe: Rounded numbers in C# Pin
spyforcer11-May-04 22:02
spyforcer11-May-04 22:02 
GeneralRe: Rounded numbers in C# Pin
Jeff Varszegi12-May-04 7:57
professionalJeff Varszegi12-May-04 7:57 
GeneralRe: Rounded numbers in C# Pin
Heath Stewart11-May-04 7:40
protectorHeath Stewart11-May-04 7:40 
GeneralRe: Rounded numbers in C# Pin
spyforcer11-May-04 22:27
spyforcer11-May-04 22:27 
GeneralCleaning a Stream Pin
Snowjim11-May-04 6:29
Snowjim11-May-04 6: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.