You have zoomed in to the timeline and are looking at frames. Also a 5 second composition's last frame would be the frame at 4 seconds and 29 frames if the frame rate was 30 fps because the last frame would start at 4:29 and end at 5:00. IOW there would be no video at 5:00
That's not a bug by the way, that is how you count frames and measure duration in video or film.
But I still don't undesrtand. In my composition from last week I can still see seconds (composition is 1:33 long). Current time indicator look like thin red line.
If I create new composition as long as composition last week I get different time ruller (it changed from 05s to 05f). Also my current time indicator has grey edge on the right side of red line in (last week composition was just red line without edge).
I must have changed something in the settings, but do not know what.
You need to read up on the timeline and it's UI. I would suggest checking the help files. Just type User Interface or Timeline in the search help field at the top right corner of AE and follow the links. The gray edge is is showing the frame under the CTI.
You can use the slider at the bottom right corner of the timeline just below the start of your timeline to control the zoom value or you can hold down the Alt/Option key and use your mouse wheel to zoom in out of the timeline if your cursor is over the timeline
Check out this screenshot. The bottom timeline is zoomed in to show just two frames, but that's the length of the bottom comp. The top timeline shows nearly 400 frames. BTW, you can change the display from timecode to frames by simply holding down the Ctrl/Cmnd key and clicking on the time indicator at the far left.
Thanks for your help. I will look up in help files.