summaryrefslogtreecommitdiff
path: root/source3/lib/time.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23357: timespec_current() was returning the wrong ns timeJeremy Allison1-1/+1
(multiplying tv_sec, not tv_usec). Jeremy. (This used to be commit bafd3b93f9ce74d7a8e2d6b36735f0977a22882c)
2007-10-10r23041: Remainder of fix for 4630: fix special case of unix_to_nt_time() forJim McDonough1-2/+10
TIME_T_MAX, and also display of it in http_timestring() (This used to be commit 2553b6a56d20ef6273001ae3b090e156e676592c)
2007-10-10r23006: Arg. Fix stupid typo in 64-bit path.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 80a63123907c3291d8bdc6d364bf7343f4f084a0)
2007-10-10r23005: If we're running on a system where time_t is 8 bytesJeremy Allison1-0/+31
we have to take care to preserve the "special" values for Windows of 0x80000000 and 0x7FFFFFFF when casting between time_t and uint32. Add conversion functions (and use them). Jeremy. (This used to be commit 4e1a0b2549f7c11326deed2801de19564af0f16a)
2007-10-10r21714: Change the VFS interface to use struct timespecJeremy Allison1-31/+113
for utimes - change the call to ntimes. This preserves nsec timestamps we get from stat (if the system supports it) and only maps back down to usec or sec resolution on time set. Looks bigger than it is as I had to move lots of internal code from using time_t and struct utimebuf to struct timespec. Jeremy. (This used to be commit 8f3d530c5a748ea90f42ed8fbe68ae92178d4875)
2007-10-10r21637: Get "password never expires" account policy working.Jim McDonough1-3/+9
0x8000000000000000LL is "infinity" to NT and should not be converted numerically to time_t. (This used to be commit f3a8048a628753990f9c5401b2bb50c19d4f66e3)
2007-10-10r21060: Start refactoring out the non-return case statementsJeremy Allison1-8/+8
into functions. Jeremy. (This used to be commit 461db3c8ed045cac70eccf3200bf9163dbce5826)
2007-10-10r20695: Remove duplication of constants.Jeremy Allison1-11/+2
Jeremy. (This used to be commit 66cca893e1aa035fa0aa05c0d542848f084fac31)
2007-10-10r20694: To get this right we need to do signed 64-bitJeremy Allison1-7/+7
comparisons here, not unsigned as we're eventually casting into what it normall a signed 32 bit value. Guenther please check (but I think I'm right here). Jeremy. (This used to be commit 31f8e0edc0c3e76654728b2c204faa70830e1f1b)
2007-10-10r20692: Fix bug found by Guenther -Jeremy Allison1-1/+1
Just try to log on in offline mode without the fix: all accounts are expired, although they are set to never expire in the PAC/info3. NTTIME "Never" needs to get (time_t) -1. We were casting a uint64 to time_t before comparing, and we should have been doing it the other way around. Guenther please check this fixes things. Jeremy. (This used to be commit f4e898b6224fd82d9805da771ef6040065de7b12)
2007-10-10r18597: A C++ warningVolker Lendecke1-1/+1
(This used to be commit 528082aed8c24b54d5781c6b3a6062b6cded74ef)
2007-10-10r18188: merge 3.0-libndr branchJelmer Vernooij1-848/+838
(This used to be commit 1115745caed3093c25d6be01ffee21819fb0a675)
2007-10-10r18009: Fixes bug 4026.Derrell Lipman1-1/+1
This completes the work Jeremy began last week, disambiguating the meaning of c_time. (In POSIX terminology, c_time means "status Change time", not "create time".) All uses of c_time, a_time and m_time have now been replaced with change_time, access_time, and write_time, and when creation time is intended, create_time is used. Additionally, the capability of setting and retrieving the create time have been added to the smbc_setxattr() and smbc_getxattr() functions. An example of setting all four times can be seen with the program examples/libsmbclient/testacl with the following command line similar to: testacl -f -S "system.*:CREATE_TIME:1000000000,ACCESS_TIME:1000000060,WRITE_TIME:1000000120,CHANGE_TIME:1000000180" 'smb://server/share/testfile.txt' The -f option turns on the new mode which uses full time names in the attribute specification (e.g. ACCESS_TIME vs A_TIME). (This used to be commit 8e119b64f1d92026dda855d904be09912a40601c)
2007-10-10r17834: Another bug found by Volker's tests in the build farm !Jeremy Allison1-7/+1
Correctly map large nt timevals to TIME_T_MAX. Jeremy. (This used to be commit 63b13d28795bbce6d9fe9e0aa4f518ef94c44f18)
2007-10-10r17831: Attempt to fix the build farm: 0x7fffffffffffffff needs special ↵Volker Lendecke1-0/+6
casing too I think. This broke 'make test' because the newly created user was set to be kicked off Mi, 22 Jan 1975 23:55:33 CET (unix time 159663333) with the setuserinfo21 call. I'm not 100% sure that 0x7ff... means max time as I do it here, I vaguely remember it to mean "don't touch". Does anybody know that for sure? Jeremy, please check this. Thanks, Volker (This used to be commit 872d1299ebffb7b7d696013fc676820f1fa1777c)
2007-10-10r17818: Fixup uint64 time calc. NT time is a 64 bit number,Jeremy Allison1-3/+3
not high value seconds, low value 100ns units. Jeremy. (This used to be commit ead75870d5d3c690fabd131a9dd8776e854638dc)
2007-10-10r17812: Fix bad unsigned comparisons with TIME_T_MIN/TIME_T_MAX.Jeremy Allison1-3/+3
Jeremy. (This used to be commit bd1fbdfb824883060b02be969a10f999d387973f)
2007-10-10r17809: Add in 64-bit integer time calculations (taken fromJeremy Allison1-41/+160
Samba4) for machines that have 64-bit integers. Leave the (double) code for machines that don't. Needs testing.... :-). Jeremy. (This used to be commit 9e65c175b0794bea3082785b5da6f5b281887ce7)
2007-10-10r17800: Start using struct timespec internally for file timesJeremy Allison1-26/+147
on the wire. This allows us to go to nsec resolution for systems that support it. It should also now be easy to add a correct "create time" (birth time) for systems that support it (*BSD). I'll be watching the build farm closely after this one for breakage :-). Jeremy. (This used to be commit 425280a1d23f97ef0b0be77462386d619f47b21d)
2007-10-10r17767: Argggg. Broke the build. Need to fix callers of put_long_date()Jeremy Allison1-68/+29
and interpret_long_date() first. Reverting... Jeremy. (This used to be commit 5d9c308e7b780c956f9810c9f345d1ef32d0f528)
2007-10-10r17766: Getting ready to properly expose 100ns times onJeremy Allison1-29/+68
the wire. Move the internals of nt_time functions to use struct timespecs. Jeremy. (This used to be commit 4ece92f7ef070c86ee7c6f523a207cfaccf84478)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-1/+46
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r16230: Fix Klocwork #861 and others. localtime and asctimeJeremy Allison1-6/+32
can return NULL. Ensure we check all returns correctly. Jeremy. (This used to be commit 6c61dc8ed6d84f310ef391fb7700e93ef42c4afc)
2007-10-10r16047: Remove unnecessary line, as this value is set in either branch of theJim McDonough1-1/+0
'if' below. Spotted by Aleksey Fedoseev. (This used to be commit 00eb42791abf3e34dc42a2067f07b8549ea31abb)
2007-10-10r15449: Remove unused function get_nttime_max (which claims itJames Peach1-6/+0
is incorrect). (This used to be commit e7ddcd8c33de1d2f053ac4c5fdaef5c31c280318)
2007-10-10r13427: Fix ctime -> st_ctime.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 95793d7e64d30190ebf917745c719f9c5a1b31e2)
2007-10-10r13423: Write wrapper functions (and configure tests) so we canJeremy Allison1-0/+102
always assume we can get a struct timespec out of a stat struct. This will allow us to portably move to nsec timestamps on files and directories in the file server code in future. Jeremy. (This used to be commit 07132d8796a08aa71d6719cb07b5b2c999930632)
2007-10-10r13350: Implement rpccli_samr_set_domain_info. Weird that it was not around :-)Volker Lendecke1-7/+21
Implement 'net rpc shell account' -- An editor for account policies nt_time_to_unix_abs changed its argument which to me seems wrong, and I could not find a caller that depends on this. So I changed it. Applied some more const in time.c. Volker (This used to be commit fc73690a7000d5a3f0f5ad34461c1f3a87edeac5)
2007-10-10r11530: Add the "time offset" parameter back in for people whoJeremy Allison1-1/+1
might use it. Jeremy. (This used to be commit b745114423a482ea8cd1ea4f80ec3fc2a9caa971)
2007-10-10r11511: A classic "friday night check-in" :-). This moves muchJeremy Allison1-243/+233
of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy. (This used to be commit 414303bc0272f207046b471a0364fa296b67c1f8)
2007-10-10r10656: BIG merge from trunk. Features not copied overGerald Carter1-0/+138
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10r8946: Some casts to fix warnings when time_t is an unsigned type. FixesTim Potter1-3/+3
bugzilla #1888 and #1894. (This used to be commit dcc74371388d280d8ee5130a04e1594ae88d19b3)
2007-10-10r7139: trying to reduce the number of diffs between trunk and 3.0; changing ↵Gerald Carter1-1/+1
version to 3.0.20pre1 (This used to be commit 9727d05241574042dd3aa8844ae5c701d22e2da1)
2007-10-10r6014: rather large change set....Gerald Carter1-0/+22
pulling back all recent rpc changes from trunk into 3.0. I've tested a compile and so don't think I've missed any files. But if so, just mail me and I'll clean backup in a couple of hours. Changes include \winreg, \eventlog, \svcctl, and general parse_misc.c updates. I am planning on bracketing the event code with an #ifdef ENABLE_EVENTLOG until I finish merging Marcin's changes (very soon). (This used to be commit 4e0ac63c36527cd8c52ef720cae17e84f67e7221)
2007-10-10r5343: Fix for bug#1525. Timestamps interpreted incorrectly on 64-bit time_t ↵Jeremy Allison1-0/+7
values. Jeremy. (This used to be commit 00f8ac509aaf2f40a067f5fe5c7699ae6f26571e)
2007-10-10r5342: Reformat some very old code.Jeremy Allison1-256/+281
Jeremy. (This used to be commit 08553faeeb77aef46264f4dfe738bc202e87ea23)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-2/+1
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r1085: Now it's had some proper user testing, merge in the deferred open ↵Jeremy Allison1-0/+6
fix. I'm still doing more testing, but it fixes a behaviour that we've been wrong on ever since the start of Samba. Jeremy. (This used to be commit 894cc6d16296b934c112786eec896846156aee5d)
2003-11-26Clean up a comment noticed by Jonathan Shao@Panasas.com and remove anRichard Sharpe1-3/+2
obsolete comment by Luke Leighton. (This used to be commit 316f83add76b56fe102f5dc4c9ce3a0413d9a1f4)
2003-11-04Use the actual size of the buffer in strftime instead of a made up valueTim Potter1-1/+1
which just happens to be less than sizeof(fstring). Closes #713. (This used to be commit 761e13da4ef8294f0b131ad7f672d023b0d222f6)
2003-10-12make nt-time <-> unix-time functions nearly reversibleSimo Sorce1-2/+5
(This used to be commit bda64a11f7c11ca303122299c3e41c49e6afd933)
2003-06-09applied patch from bug#140Andrew Tridgell1-1/+2
this fixes a timestamp problem with 64 bit machines (This used to be commit 0ce6eddad8e148bc6d195ddefb773326339d06e6)
2003-02-24Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.Andrew Bartlett1-1/+1
Andrew Bartlett (This used to be commit 9ef0d40c3f8aef52ab321dc065264c42065bc876)
2002-12-10The _abs time functions should not be converting from/to GMT.Jeremy Allison1-18/+11
Patch from "Jordan Russell" <jr-list-samba-technical@quo.to> Jeremy. (This used to be commit 199c9fcbb9e9a5d4b75ac370d358f54e91808e76)
2002-09-26sync with HEADGerald Carter1-2/+12
(This used to be commit ee9cbf58071adb627a49a94c6340aaba330486b5)
2002-09-25sync'ing up for 3.0alpha20 releaseGerald Carter1-0/+6
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-6/+1
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)