/[gli]/trunk/src/net/server/html/webgli/timezone.pyhtml
Gentoo

Diff of /trunk/src/net/server/html/webgli/timezone.pyhtml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1252 Revision 1253
12 except: 12 except:
13 error_msg = "ERROR: Could not set that timezone!" 13 error_msg = "ERROR: Could not set that timezone!"
14 if not "UTC" in zonepath: # set conf value to local if not already set. 14 if not "UTC" in zonepath: # set conf value to local if not already set.
15 etc_files = shared_info.install_profile.get_etc_files() 15 etc_files = shared_info.install_profile.get_etc_files()
16 if not "conf.d/clock" in etc_files: 16 if not "conf.d/clock" in etc_files:
17 etc_files['conf.d/clock'] = {}
17 etc_files['conf.d/clock']['CLOCK'] = "local" 18 etc_files['conf.d/clock']['CLOCK'] = "local"
18 try: 19 try:
19 shared_info.install_profile.set_etc_files(etc_files) 20 shared_info.install_profile.set_etc_files(etc_files)
20 except: 21 except:
21 error_msg += "ERROR: Could not set the clock to local!" 22 error_msg += "ERROR: Could not set the clock to local!"
22else: 23else:
23 zonepath = "/usr/share/zoneinfo/" 24 zonepath = "/usr/share/zoneinfo/"
24skiplist = ["zone.tab","iso3166.tab","posixrules"] 25skiplist = ["zone.tab","iso3166.tab","posixrules"]
25tzlist = [] 26tzlist = []
27if os.path.isdir(zonepath):
26for entry in os.listdir(zonepath): 28 for entry in os.listdir(zonepath):
27 if entry not in skiplist: 29 if entry not in skiplist:
28 if os.path.isdir(zonepath + "/" + entry): entry += "/" 30 if os.path.isdir(zonepath + "/" + entry): entry += "/"
29 tzlist.append(entry) 31 tzlist.append(entry)
30tzlist.sort() 32tzlist.sort()
31?> 33?>
32<h2>Timezone Setup </h2> 34<h2>Timezone Setup </h2>
33<: if error_msg: 35<: if error_msg:
34<br><% error_msg %><br><br> 36<br><% error_msg %><br><br>
35:> 37:>
36Timezones:<br> 38Timezones:<br>
37<form name="Timezone" method="post" action="/webgli/Timezone" enctype="multipart/form-data"> 39<form name="Timezone" method="post" action="/webgli/timezone.pyhtml" enctype="multipart/form-data">
38<input type="hidden" name="tzback" value="<% zonepath %>"><br> 40<input type="hidden" name="tzback" value="<% zonepath %>"><br>
39<: for timezone in tzlist: 41<: for timezone in tzlist:
40<a href="/webgli/timezone.pyhtml?zonepath=<% zonepath+timezone %>"><% timezone %></a><br> 42<a href="/webgli/timezone.pyhtml?zonepath=<% zonepath+timezone %>"><% timezone %></a><br>
41:> 43:>
42<br><input type="submit" name="back" value="Back"> 44<br><input type="submit" name="back" value="Back">

Legend:
Removed from v.1252  
changed lines
  Added in v.1253

  ViewVC Help
Powered by ViewVC 1.1.20