Example #1
0
        public override string ToString()
        {
            if (m_dateTime.CompareTo(tooOld) < 0)
            {
                return("");
            }
            else
            {
                string sTime;
                switch (m_dateTimeDisplayMode)
                {
                default:
                case DateTimeDisplayMode.MayConvertToUTC:
                    if (Project.useUtcTime)
                    {
                        string format = "yyyy MMM dd HH:mm:ss";
                        sTime = m_dateTime.ToString(format) + " UTC";
                    }
                    else
                    {
                        sTime = m_dateTime.ToString();                                  // current culture
                    }
                    break;

                case DateTimeDisplayMode.ConvertToLocal:
                    sTime = Project.zuluToLocal(m_dateTime).ToString();                                         // trackpoints store UTC, print local time.
                    break;

                case DateTimeDisplayMode.DisplayAsIs:
                    sTime = m_dateTime.ToString();                              // current culture
                    break;
                }
                return(sTime);
            }
        }
Example #2
0
        /// <summary>
        /// concatenates values
        /// </summary>
        /// <returns></returns>
        public string toTableString()
        {
            bool dsUseUtcTime = Project.useUtcTime;

            string values = (m_nValues > 1) ? "  values:" : "     ";

            for (int j = 0; j < m_nValues; j++)
            {
                values += " " + m_values[j];
            }
            DateTime dt = dsUseUtcTime ? m_dateTime : Project.zuluToLocal(m_dateTime);

            return(dt.ToLongDateString() + " " + dt.ToLongTimeString() + values);
        }
Example #3
0
        public string toString()
        {
            bool dsUseUtcTime = Project.useUtcTime;

            return("" + (dsUseUtcTime ? m_dateTime : Project.zuluToLocal(m_dateTime)) + "(" + m_nValues + " values)");
        }