Index: boost/date_time/tz_db_base.hpp =================================================================== --- boost/date_time/tz_db_base.hpp (revision 83763) +++ boost/date_time/tz_db_base.hpp (working copy) @@ -303,9 +303,16 @@ tokenizer tokens(rule, sep); // 3 fields tokenizer_iterator tok_iter = tokens.begin(); - nth = std::atoi(tok_iter->c_str()); ++tok_iter; - d = std::atoi(tok_iter->c_str()); ++tok_iter; - m = std::atoi(tok_iter->c_str()); + + if (tok_iter != tokens.end()) { + nth = std::atoi(tok_iter->c_str()); ++tok_iter; + } + if (tok_iter != tokens.end()) { + d = std::atoi(tok_iter->c_str()); ++tok_iter; + } + if (tok_iter != tokens.end()) { + m = std::atoi(tok_iter->c_str()); + } }