1Date::Manip::Migration5Utsoe6r(3C)ontributed Perl DocumeDnattaet:i:oMnanip::Migration5to6(3)
2
3
4
6 Date::Manip::Migration5to6 - how to upgrade from 5.xx to 6.00
7
9 When upgrading from Date::Manip 5.xx to 6.00, a few changes may be
10 necessary to your scripts.
11
12 The Date::Manip::Changes5to6 document lists in more detail the ways in
13 which Date::Manip changed, but very few of these actually entail
14 changes to your script.
15
16 It should be noted that once the changes are made to your script, it
17 will no longer run correctly in 5.xx.
18
20 The following changes are necessary, or strongly suggested:
21
22 Reading config files with Date_Init
23 If you use Date_Init to read any config files (if you do business
24 mode calculations, you probably do), you should remove all of the
25 following config variables from your call to Date_Init:
26
27 GlobalCnf=FILE
28 PersonalCnf=FILE
29 PathSep=*
30 IgnoreGlobalCnf=*
31 PersonalCnfPath=*
32
33 and replace them with:
34
35 ConfigFile=FILE
36
37 where FILE is now the full path to a config file. Also, the
38 ConfigFile argument should be the first argument in Date_Init.
39
40 Date_ConvTZ
41 The Date_ConvTZ function has changed. It should now take 3
42 arguments:
43
44 $date = Date_ConvTZ($date,$from,$to);
45
46 If $from is not given, it defaults to the local time zone. If $to
47 is not given, it defaults to the local time zone.
48
49 The date is converted from the $from time zone into the $to time
50 zone. Both should be any time zone (or alias) supported by
51 Date::Manip.
52
53 The old $errlevel argument is no longer handled.
54
55 ConvTZ and TZ config variables
56 If you use either the ConvTZ or TZ config variables, you should
57 replace them with either SetDate or ForceDate. See the
58 Date::Manip::Config document for information.
59
60 Other deprecated config variables
61 Most of the deprecated config variables continue to function
62 (though they will be removed at a future date). These include:
63
64 GlobalCnf
65 IgnoreGlobalCnf
66 PersonalCnf
67 PersonalCnfPath
68 PathSep
69 TZ
70 Internal
71 IntCharSet
72
73 The following variables have been removed. If you use any of them,
74 you may need to modify your scripts:
75
76 ConvTZ
77 TodayIsMidnight
78 DeltaSigns
79 UpdateCurrTZ
80
81 today, yesterday, tomorrow
82 If you parse the strings "today", "yesterday", or "tomorrow" in
83 order to get the time now, or 24 hours in the past/future, this
84 will no longer work. These strings now refer strictly to the date
85 (so "today" is the current day at midnight, "yesterday" is the
86 previous day at midnight, etc.).
87
88 To get the time now, 24 hours ago, or 24 hours in the future, you
89 would need to parse the strings "now", "-24:00:00", or "+24:00:00"
90 respectively.
91
92 Do not use Memoize
93 In 5.xx, it was documented that you could use the module Memoize to
94 speed up Date::Manip, especially when sorting dates.
95
96 This information is no longer accurate. Using Memoize in conjuction
97 with Date::Manip should have little impact on performance, and may
98 lead to incorrect results, especially if you change config
99 variables.
100
101 Please see the Date::Manip::Changes5to6 (GENERAL CHANGES) document
102 for more information.
103
104 If you find other instances where it is necessary to modify your
105 script, please email me so that I can add that information to this
106 document.
107
109 Please refer to the Date::Manip::Problems documentation for information
110 on submitting bug reports or questions to the author.
111
113 Date::Manip - main module documentation
114
116 This script is free software; you can redistribute it and/or modify it
117 under the same terms as Perl itself.
118
120 Sullivan Beck (sbeck@cpan.org)
121
122
123
124perl v5.10.1 2011-12-07 Date::Manip::Migration5to6(3)