  #include "selfdrive/locationd/generated/ubx.h"
  
  // protocol constants
  namespace ublox {
    const uint8_t PREAMBLE1 = 0xb5;
    const uint8_t PREAMBLE2 = 0x62;
  
 
</s> remove       struct tm sys_time = get_time();
 </s> add       struct tm sys_time = util::get_time(); </s> remove   struct tm sys_time;
  gmtime_r(&rawtime, &sys_time);

  return sys_time;
}

bool time_valid(struct tm sys_time){
  int year = 1900 + sys_time.tm_year;
  int month = 1 + sys_time.tm_mon;
  return (year > 2020) || (year == 2020 && month >= 10);
}
 </s> add  </s> remove     struct tm sys_time = get_time();
 </s> add     struct tm sys_time = util::get_time();
using namespace std::string_literals;

  #include "selfdrive/locationd/generated/ubx.h"
  
using namespace std::string_literals;

  // protocol constants
  namespace ublox {
    const uint8_t PREAMBLE1 = 0xb5;
    const uint8_t PREAMBLE2 = 0x62;
  
keep add keep keep keep keep keep
 Store almanac on ublox poweroff (#20967)

* Store almanac on ublox poweroff

* send current UTC time

* move message building to ublox_msg.h 
selfdrive/locationd/ublox_msg.h