cvsimport
[beagle.git] / beagled / Lucene.Net / upstream-changes / 04_utc-times.patch
blobe533ae9478d991a7e3b499b1ee5d9fcb942e0c46
1 From: Joe Shaw <joeshaw@novell.com>
3 Use UTC times
5 Index: Store/FSDirectory.cs
6 ===================================================================
7 RCS file: /cvs/gnome/beagle/beagled/Lucene.Net/Store/FSDirectory.cs,v
8 retrieving revision 1.19.2.15
9 diff -u -3 -p -r1.19.2.15 FSDirectory.cs
10 --- Store/FSDirectory.cs 25 Sep 2006 23:02:03 -0000 1.19.2.15
11 +++ Store/FSDirectory.cs 30 Sep 2006 01:51:20 -0000
12 @@ -506,21 +506,21 @@ namespace Lucene.Net.Store
13 public override long FileModified(System.String name)
15 System.IO.FileInfo file = new System.IO.FileInfo(System.IO.Path.Combine(directory.FullName, name));
16 - return (file.LastWriteTime.Ticks);
17 + return (file.LastWriteTimeUtc.Ticks);
20 /// <summary>Returns the time the named file was last modified. </summary>
21 public static long FileModified(System.IO.FileInfo directory, System.String name)
23 System.IO.FileInfo file = new System.IO.FileInfo(System.IO.Path.Combine(directory.FullName, name));
24 - return (file.LastWriteTime.Ticks);
25 + return (file.LastWriteTimeUtc.Ticks);
28 /// <summary>Set the modified time of an existing file to now. </summary>
29 public override void TouchFile(System.String name)
31 System.IO.FileInfo file = new System.IO.FileInfo(System.IO.Path.Combine(directory.FullName, name));
32 - file.LastWriteTime = System.DateTime.Now;
33 + file.LastWriteTime = System.DateTime.UtcNow;
36 /// <summary>Returns the length in bytes of a file in the directory. </summary>
37 Index: Store/RAMDirectory.cs
38 ===================================================================
39 RCS file: /cvs/gnome/beagle/beagled/Lucene.Net/Store/RAMDirectory.cs,v
40 retrieving revision 1.4.4.6
41 diff -u -3 -p -r1.4.4.6 RAMDirectory.cs
42 --- Store/RAMDirectory.cs 25 Sep 2006 22:54:07 -0000 1.4.4.6
43 +++ Store/RAMDirectory.cs 30 Sep 2006 01:51:20 -0000
44 @@ -170,7 +170,7 @@ namespace Lucene.Net.Store
45 // final boolean MONITOR = false;
47 RAMFile file = (RAMFile) files[name];
48 - long ts2, ts1 = System.DateTime.Now.Ticks;
49 + long ts2, ts1 = System.DateTime.UtcNow.Ticks;
50 do
52 try
53 @@ -180,7 +180,7 @@ namespace Lucene.Net.Store
54 catch (System.Threading.ThreadInterruptedException)
57 - ts2 = System.DateTime.Now.Ticks;
58 + ts2 = System.DateTime.UtcNow.Ticks;
59 // if (MONITOR) {
60 // count++;
61 // }
62 @@ -244,4 +244,4 @@ namespace Lucene.Net.Store
67 \ No newline at end of file
69 Index: Store/RAMFile.cs
70 ===================================================================
71 RCS file: /cvs/gnome/beagle/beagled/Lucene.Net/Store/RAMFile.cs,v
72 retrieving revision 1.3.4.5
73 diff -u -3 -p -r1.3.4.5 RAMFile.cs
74 --- Store/RAMFile.cs 25 Sep 2006 22:36:32 -0000 1.3.4.5
75 +++ Store/RAMFile.cs 30 Sep 2006 01:51:20 -0000
76 @@ -23,6 +23,6 @@ namespace Lucene.Net.Store
78 internal System.Collections.ArrayList buffers = System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(10));
79 internal long length;
80 - internal long lastModified = System.DateTime.Now.Ticks;
81 + internal long lastModified = System.DateTime.UtcNow.Ticks;
84 \ No newline at end of file
86 Index: Store/RAMOutputStream.cs
87 ===================================================================
88 RCS file: /cvs/gnome/beagle/beagled/Lucene.Net/Store/RAMOutputStream.cs,v
89 retrieving revision 1.3.4.6
90 diff -u -3 -p -r1.3.4.6 RAMOutputStream.cs
91 --- Store/RAMOutputStream.cs 25 Sep 2006 22:54:07 -0000 1.3.4.6
92 +++ Store/RAMOutputStream.cs 30 Sep 2006 01:51:20 -0000
93 @@ -107,7 +107,7 @@ namespace Lucene.Net.Store
94 if (pointer > file.length)
95 file.length = pointer;
97 - file.lastModified = System.DateTime.Now.Ticks;
98 + file.lastModified = System.DateTime.UtcNow.Ticks;
101 public override void Close()
102 @@ -125,4 +125,4 @@ namespace Lucene.Net.Store
103 return file.length;
107 \ No newline at end of file