Version 16.141.1

This commit is contained in:
Antonio Cañas Vargas 2017-02-26 21:05:44 +01:00
parent 5a049ed62b
commit 1537a2fdce
3 changed files with 11 additions and 6 deletions

View File

@ -170,6 +170,7 @@ function setLocalDateTimeFormFromUTC (id,TimeUTC) {
if (TimeUTC) {
d = new Date();
d.setTime(TimeUTC * 1000);
Year = d.getFullYear();
for (var i=0; i<FormYea.options.length && !YearIsValid; i++)
if (FormYea.options[i].value == Year) {
@ -318,7 +319,6 @@ function setDateRange (idStart,idEnd,d) {
adjustDateForm (idStart); // Adjust date form correcting days in the month
document.getElementById(idStart+'Day').options[Day-1].selected = true;
setHMSTo000000(idStart);
setUTCFromLocalDateTimeForm(idStart);
FormYea = document.getElementById(idEnd+'Year');
for (var i=0; i<FormYea.options.length; i++)
@ -330,7 +330,6 @@ function setDateRange (idStart,idEnd,d) {
adjustDateForm (idEnd); // Adjust date form correcting days in the month
document.getElementById(idEnd+'Day').options[Day-1].selected = true;
setHMSTo235959(idEnd);
setUTCFromLocalDateTimeForm(idEnd);
}
// Set hour, minute and second in a form to 00:00:00
@ -338,6 +337,7 @@ function setHMSTo000000 (id) {
document.getElementById(id+'Hour' ).options[0].selected = true;
document.getElementById(id+'Minute').options[0].selected = true;
document.getElementById(id+'Second').options[0].selected = true;
setUTCFromLocalDateTimeForm(id);
}
//Set hour, minute and second in a form to 23:59:59
@ -345,6 +345,7 @@ function setHMSTo235959 (id) {
document.getElementById(id+'Hour' ).options[23].selected = true;
document.getElementById(id+'Minute').options[59].selected = true;
document.getElementById(id+'Second').options[59].selected = true;
setUTCFromLocalDateTimeForm(id);
}
// Write clock in client local time updated every minute

View File

@ -202,13 +202,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.141 (2017-02-26)"
#define Log_PLATFORM_VERSION "SWAD 16.141.1 (2017-02-26)"
#define CSS_FILE "swad16.139.6.css"
#define JS_FILE "swad16.141.js"
#define JS_FILE "swad16.141.1.js"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/*
Version 16.141.1: Feb 26, 2017 Fixed bug in range of dates. (213056 lines)
Version 16.141 : Feb 26, 2017 Default range of dates for stats starts at HH:MM:SS=00:00:00 and ends at HH:MM:SS=23:59:59. (213053 lines)
Version 16.140.5: Feb 25, 2017 Days in recent log changed from 8 to 15. (213008 lines)
Version 16.140.4: Feb 24, 2017 Fixed bug in T/F test questions, reported by Nuria Torres Rosell. (213006 lines)

View File

@ -271,6 +271,7 @@ void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (bool SetHMS00000
"<td class=\"LEFT_MIDDLE\">",
The_ClassForm[Gbl.Prefs.Theme],
Txt_START_END_TIME[Dat_START_TIME]);
/* Date-time */
Dat_WriteFormClientLocalDateTimeFromTimeUTC ("Start",
"Start",
@ -523,10 +524,12 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
switch (SetHMS)
{
case Dat_HMS_TO_000000:
fprintf (Gbl.F.Out,"setHMSTo000000('%s');",Id);
// Set HH:MM:SS form selectors to 00:00:00
fprintf (Gbl.F.Out,"setHMSTo000000('%s');",Id); // Hidden TimeUTC is also adjusted
break;
case Dat_HMS_TO_235959:
fprintf (Gbl.F.Out,"setHMSTo235959('%s');",Id);
// Set HH:MM:SS form selectors to 23:59:59
fprintf (Gbl.F.Out,"setHMSTo235959('%s');",Id); // Hidden TimeUTC is also adjusted
break;
default:
break;