Changeset 1947 for trunk/src/Scantable.cpp
- Timestamp:
- 11/10/10 14:48:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r1931 r1947 684 684 std::string Scantable::formatTime(const MEpoch& me, bool showdate) const 685 685 { 686 return formatTime(me, showdate, 0); 687 } 688 689 std::string Scantable::formatTime(const MEpoch& me, bool showdate, uInt prec) const 690 { 686 691 MVTime mvt(me.getValue()); 687 692 if (showdate) 688 mvt.setFormat(MVTime::YMD); 693 //mvt.setFormat(MVTime::YMD); 694 mvt.setFormat(MVTime::YMD, prec); 689 695 else 690 mvt.setFormat(MVTime::TIME); 696 //mvt.setFormat(MVTime::TIME); 697 mvt.setFormat(MVTime::TIME, prec); 691 698 ostringstream oss; 692 699 oss << mvt; … … 1035 1042 } 1036 1043 1037 std::string Scantable::getTime(int whichrow, bool showdate) const 1038 { 1039 MEpoch::ROScalarColumn timeCol(table_, "TIME"); 1044 // std::string Scantable::getTime(int whichrow, bool showdate) const 1045 // { 1046 // MEpoch::ROScalarColumn timeCol(table_, "TIME"); 1047 // MEpoch me; 1048 // if (whichrow > -1) { 1049 // me = timeCol(uInt(whichrow)); 1050 // } else { 1051 // Double tm; 1052 // table_.keywordSet().get("UTC",tm); 1053 // me = MEpoch(MVEpoch(tm)); 1054 // } 1055 // return formatTime(me, showdate); 1056 // } 1057 1058 std::string Scantable::getTime(int whichrow, bool showdate, uInt prec) const 1059 { 1040 1060 MEpoch me; 1041 if (whichrow > -1) { 1042 me = timeCol(uInt(whichrow)); 1043 } else { 1044 Double tm; 1045 table_.keywordSet().get("UTC",tm); 1046 me = MEpoch(MVEpoch(tm)); 1047 } 1048 return formatTime(me, showdate); 1061 me = getEpoch(whichrow); 1062 return formatTime(me, showdate, prec); 1049 1063 } 1050 1064
Note:
See TracChangeset
for help on using the changeset viewer.