Exemplo n.º 1
0
	struct tm& get_current_tm()
	{
		uint32 now = init_tm();
		k_tm.tm_hour = (now - k_current_day_start_ts) / 3600;
		k_tm.tm_min = ((now - k_current_day_start_ts) % 3600) / 60;
		k_tm.tm_sec = ((now - k_current_day_start_ts) % 3600) % 60;
		return k_tm;
	}
Exemplo n.º 2
0
 //! puts the day of month
 OutItrT put(OutItrT next, 
             std::ios_base& a_ios, 
             char_type fill_char, 
             const day_type& day) const 
 {
   tm dtm;
   init_tm(dtm);
   dtm.tm_mday = day.as_number();
   char_type tmp[3] = {'%','d'};
   string_type temp_format(tmp);
   return do_put_tm(next, a_ios, fill_char, dtm, temp_format);
 }
Exemplo n.º 3
0
 OutItrT put(OutItrT next, 
             std::ios_base& a_ios, 
             char_type fill_char, 
             const day_of_week_type& dow) const 
 {
   //if (d.is_special()) { 
   //  return do_put_special(next, a_ios, fill_char, d.as_special());
   //}
   //The following line of code required the date to support a to_tm function
   tm dtm;
   init_tm(dtm);
   dtm.tm_wday = dow;
   return do_put_tm(next, a_ios, fill_char, dtm, m_weekday_format);
 }
Exemplo n.º 4
0
	uint8 get_current_minute_secs()
	{
		uint32 now = init_tm();
		uint32 minsecs = (now - k_current_day_start_ts) % 3600;
		return minsecs % 60;
	}
Exemplo n.º 5
0
	uint8 get_current_month_day()
	{
		init_tm();
		return k_tm.tm_mday;
	}
Exemplo n.º 6
0
	uint8 get_current_month()
	{
		init_tm();
		return k_tm.tm_mon + 1;
	}
Exemplo n.º 7
0
	uint32 get_current_year()
	{
		init_tm();
		return k_tm.tm_year + 1900;
	}
Exemplo n.º 8
0
	uint32 get_current_hour()
	{
		uint32 now = init_tm();
		return (now - k_current_day_start_ts) / 3600;
	}
Exemplo n.º 9
0
	uint32 get_current_year_day()
	{
		init_tm();
		return k_tm.tm_yday;
	}